Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydoc with -w option does not work for a lot of help topics #58885

Open
gregorhoch mannequin opened this issue Apr 26, 2012 · 3 comments
Open

pydoc with -w option does not work for a lot of help topics #58885

gregorhoch mannequin opened this issue Apr 26, 2012 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@gregorhoch
Copy link
Mannequin

gregorhoch mannequin commented Apr 26, 2012

BPO 14680
Nosy @merwok
Files
  • pydoc.patch: -w now works for topics, keywords and symbols
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2012-04-26.22:11:11.515>
    labels = ['library']
    title = 'pydoc with -w option does not work for a lot of help topics'
    updated_at = <Date 2013-10-20.15:56:23.462>
    user = 'https://bugs.python.org/gregorhoch'

    bugs.python.org fields:

    activity = <Date 2013-10-20.15:56:23.462>
    actor = 'sunfinite'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2012-04-26.22:11:11.515>
    creator = 'gregor.hoch'
    dependencies = []
    files = ['32258']
    hgrepos = []
    issue_num = 14680
    keywords = ['patch']
    message_count = 3.0
    messages = ['159428', '162569', '200594']
    nosy_count = 3.0
    nosy_names = ['eric.araujo', 'gregor.hoch', 'sunfinite']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue14680'
    versions = ['Python 2.7', 'Python 3.4']

    @gregorhoch
    Copy link
    Mannequin Author

    gregorhoch mannequin commented Apr 26, 2012

    pydoc with pydoc with -w option (to write html files) does not work for a lot of help topics (e.g. EXPRESSIONS, FORMATTING, TUPLELITERALS, def, if, else...)
    If you look at the source you can see that when using the switch '-w' (http://hg.python.org/cpython/file/2.7/Lib/pydoc.py#l2311) pydoc uses the function writedoc, otherwise to the class Helper (http://hg.python.org/cpython/file/2.7/Lib/pydoc.py#l2325). In the Helper-class EXPRESSIONS is defined under line 1666 (http://hg.python.org/cpython/file/2.7/Lib/pydoc.py#l1666). The function writedoc does not utilize this nor does it use the Helper class.

    For dicussion see: http://stackoverflow.com/a/10333615/1318686

    Example:
    pydoc EXPRESSIONS
    works perfectly fine but
    pydoc -w EXPRESSIONS
    does not.

    @gregorhoch gregorhoch mannequin assigned docspython Apr 26, 2012
    @gregorhoch gregorhoch mannequin added the docs Documentation in the Doc dir label Apr 26, 2012
    @merwok
    Copy link
    Member

    merwok commented Jun 10, 2012

    Thanks for the report. Are you interested in making a patch? Also, could you tell if the bug happens in 3.2?

    @merwok merwok added stdlib Python modules in the Lib dir and removed docs Documentation in the Doc dir labels Jun 10, 2012
    @sunfinite
    Copy link
    Mannequin

    sunfinite mannequin commented Oct 20, 2013

    This issue is present in 3.4 too.

    Added patch for 3.4.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant