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.

Author terry.reedy
Recipients Frédéric Jolliton, Mariatta, PeterLovett, aroberge, azsorkin, belopolsky, berker.peksag, donmez, eric.araujo, ezio.melotti, georg.brandl, lukasz.langa, r.david.murray, rhettinger, ron_adam, serhiy.storchaka, terry.reedy, tritium, vterron
Date 2016-10-06.03:03:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475723011.6.0.0907101234556.issue10716@psf.upfronthosting.co.za>
In-reply-to
Content
Since David added me as nosy, I will address the IDLE issues raised above.

But first, a question.  Does 'deprecating HTML output' merely mean deprecating the old output in favor of new and better HTML output, or deprecating having any html output, which would also mean deprecating the html doc server?  I am strongly against the latter.

Currently, IDLE, in both pyshell and run.py, imports pydoc and sets "pydoc.pager = pydoc.plainpager".  Bypassing pydoc.getpager this way is not documented, but seems perhaps necessary.  Other than this, I believe 'help(xyz)' is treated by IDLE just like any other user code.

Serhiy, msg278126 > "It would be nice if IDLE use this feature"

There are actually two features: hmtl output, and the html server, which uses the default browser to display the output.

Since a year ago, IDLE help displays the html IDLE doc produced by sphinx in a subclass of tkinter Text that feeds the page to a subclass of HTMLParser.  The code is in help.py.  Sphinx's html seems to follow Frédéric's guidelines in msg246917.  I suspect the CSS files are ignored.  We might want to do something similar with pydocs html output.

Raymond: is sphinx's pydoctheme anything like the css you are looking for?  Could it be used as a starting point?
  <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />


There have been requests that 'long' help output (for modules and classes) be displayed separately from Shell itself so that it does not obscure history and be easier to refer to.  If we do this, using html instead of plain text would be nice, especially if new features were added.

Serhiy, cont. > "I think we should enhance HTML output not just by making it looking better, but by adding more interactivity. For example add the ability to collapse classes, methods, etc, add more hyperlinks."

I mainly use pydoc server for tkinter.  I would *love* have the repetitive 'inherited methods' section for each class collapsed by default.  Ditto for when I use help interactively.  To me, this is the single worst feature of pydoc output.

David msg278127 > "If Terry would like to see pydoc enhanced to support idle, then I think that would decide the issue."

I am not sure what you mean by 'the issue' and I can't currently think of anything IDLE-specific that pydoc should do, other than be consistent.  However, producing modern, decent looking html output would make html use possible.  Incorporating the current output, as displayed in the server, might be a net negative PR move.


Side note: thinking about how to make a clickable link in a Text widget, I realized that that IDLE already does some syntax tagging for colors (keywords, builtins, def and class identifiers).  The same tags could be bound to double-click or right-click to display help popups, such as
----------------------------------------------------------
The "if" statement is used for conditional execution:

   if_stmt ::= "if" expression ":" suite
               ( "elif" expression ":" suite )*
               ["else" ":" suite]

It selects exactly one of the suites by evaluating the expressions one
by one until one is found to be true (see section Boolean operations
for the definition of true and false); then that suite is executed
(and no other part of the "if" statement is executed or evaluated).
If all expressions are false, the suite of the "else" clause, if
present, is executed.

Related help topics: TRUTHVALUE
--------------------------------------------------------------------
with the grammar chunk highlighted and the related topics clickable.  What IDLE would need here is consistency in the format of the help texts.
History
Date User Action Args
2016-10-06 03:03:31terry.reedysetrecipients: + terry.reedy, georg.brandl, rhettinger, belopolsky, ron_adam, donmez, aroberge, ezio.melotti, eric.araujo, r.david.murray, PeterLovett, lukasz.langa, berker.peksag, vterron, serhiy.storchaka, tritium, azsorkin, Frédéric Jolliton, Mariatta
2016-10-06 03:03:31terry.reedysetmessageid: <1475723011.6.0.0907101234556.issue10716@psf.upfronthosting.co.za>
2016-10-06 03:03:31terry.reedylinkissue10716 messages
2016-10-06 03:03:29terry.reedycreate