This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pydoc with -w option does not work for a lot of help topics
Type: Stage: needs patch
Components: Library (Lib) Versions: Python 3.4, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, gregor.hoch, sunfinite
Priority: normal Keywords: patch

Created on 2012-04-26 22:11 by gregor.hoch, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
pydoc.patch sunfinite, 2013-10-20 15:56 -w now works for topics, keywords and symbols review
Messages (3)
msg159428 - (view) Author: Gregor (gregor.hoch) Date: 2012-04-26 22:11
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.
msg162569 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-06-10 01:20
Thanks for the report.  Are you interested in making a patch?  Also, could you tell if the bug happens in 3.2?
msg200594 - (view) Author: Sunny K (sunfinite) * Date: 2013-10-20 15:56
This issue is present in 3.4 too.

Added patch for 3.4.
History
Date User Action Args
2022-04-11 14:57:29adminsetgithub: 58885
2013-10-20 15:56:23sunfinitesetfiles: + pydoc.patch
versions: + Python 3.4
nosy: + sunfinite

messages: + msg200594

keywords: + patch
2012-06-10 01:21:00eric.araujosetassignee: docs@python ->

components: + Library (Lib), - Documentation
nosy: - docs@python
2012-06-10 01:20:48eric.araujosetnosy: + eric.araujo

messages: + msg162569
stage: needs patch
2012-04-26 22:11:11gregor.hochcreate