Issue 10726: pydoc: don’t display raw reST in keyword help (original) (raw)

Created on 2010-12-17 12:17 by eric.araujo, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg124196 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-17 12:17
When one runs “pydoc with”, the output is a block of text marked up with reST. It would be more helpful to render it as text or HTML thanks to a minimal reST parser and transformer. In http://mail.python.org/pipermail/python-dev/2010-July/101563.html, Martin Geisler (Mercurial dev) said: “We're using light-weight ReST markup in the Mercurial help texts and transform it into straight text upon display in the terminal. We want no external dependencies for Mercurial, so I wrote a "mini ReST" parser in about 400 lines of code. It cheats a lot and can only handle simple constructs...” [A few messages later] “I would be happy to relicense it under the Python license.” So, proposed battle plan: 1) Agree this feature request is desirable. 2) Agree on the inclusion of mg’s minirst, which provides an reST parser and a plain text formatter. 3) Add an HTML formatter. 4) Wire minirst into pydoc.
msg124201 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-17 13:07
I'm not necessarily opposed to this, but an alternative is to modify pyspecific.py so that it generates text output from the ReST when it builds the pydoc topic index.
msg124205 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-17 14:50
No need for any of that -- the output you see already is the text output from Sphinx.
msg124207 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-17 15:14
Well, in that case, can we change the text style for code and related markup to be something prettier? Normal single quotes, perhaps?
msg124208 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-17 15:15
s/prettier/more readable/
msg124210 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-17 15:27
Sure, I can do that for the next version.
History
Date User Action Args
2022-04-11 14:57:10 admin set github: 54935
2010-12-17 15:27:55 georg.brandl set nosy:georg.brandl, eric.araujo, r.david.murraymessages: +
2010-12-17 15:15:14 r.david.murray set nosy:georg.brandl, eric.araujo, r.david.murraymessages: +
2010-12-17 15:14:57 r.david.murray set nosy:georg.brandl, eric.araujo, r.david.murraymessages: +
2010-12-17 14:50:14 georg.brandl set status: open -> closednosy:georg.brandl, eric.araujo, r.david.murrayresolution: works for me
2010-12-17 14:50:06 georg.brandl set nosy:georg.brandl, eric.araujo, r.david.murraymessages: +
2010-12-17 13:07:33 r.david.murray set nosy: + georg.brandl, r.david.murraymessages: + components: + Demos and Tools
2010-12-17 12:17:20 eric.araujo create