You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eht16mannequin opened this issue
Aug 4, 2019
· 3 comments
Labels
3.12bugs and security fixes3.13bugs and security fixes3.14new features, bugs and security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
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=Noneclosed_at=Nonecreated_at=<Date2019-08-04.12:48:20.274>labels= ['3.8', 'type-bug', 'library']
title='pydoc topics, keywords and symbols always use pager instead of output'updated_at=<Date2019-08-04.12:55:23.691>user='https://github.com/eht16'
I noticed a probably unintended behavior in help() usage:
when an output is set on pydoc.Helper(), most of its methods
use this output instead of a pager.
But 'True', 'False' and 'None' as well as all topics, keywords
and symbols always use a pager instead of the configured output.
My use case is to use the pydoc help system to display help contents
in Geany (a text editor) in a graphical manner
(and so I cannot make any use of a pager).
Example code:
#!/usr/bin/env python3
# -- coding: utf-8 --
fromioimportStringIOimportpydocimportsysif__name__=='__main__':
help_text=StringIO()
helper=pydoc.Helper(output=help_text)
# help contents are written to help_text as expectedhelper.help('pydoc')
# the following calls each show the help contents in a pager instead# of using the configured outputhelper.help('True')
helper.help('False')
helper.help('None')
helper.help('**') # symbol examplehelper.help('SEQUENCES') # topic examplehelper.help('await') # keyword example
3.12bugs and security fixes3.13bugs and security fixes3.14new features, bugs and security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: