[Python-bugs-list] [ python-Bugs-405553 ] pydoc.help broken in IDLE
nobody
nobody@sourceforge.net
Sat, 03 Mar 2001 18:32:33 -0800
Bugs #405553, was updated on 2001-03-02 15:06
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=405553&group_id=5470
Category: Python Library
Group: None
Status: Open
Priority: 7
Submitted By: Guido van Rossum
Assigned to: Ka-Ping Yee
Summary: pydoc.help broken in IDLE
Initial Comment:
pydoc has an (undocumented?) feature that after "from
pydoc import help" in an interactive interpreter,
help(object) or help("modulename") gives help.
This doesn't work right in IDLE:
On Unix, it brings up a pager in the terminal window
where IDLE was started. That's not what you want!!!
On Windows, where IDLE is normally started from the
Start menu, it gives an error, complaining about an
invalid file descriptor.
Perhaps it should invoke a stupid internal pager, like
the one used by the license() built-in command? That
"just works" in IDLE!
----------------------------------------------------------------------
Comment By: Ka-Ping Yee
Date: 2001-03-03 18:32
Message:
Logged In: YES
user_id=45338
The pydoc.getpager() routine was written to try to take
care of this case by making sure that sys.stdout is a real
file and sys.stdin is a tty before launching an interactive
pager. I just tried it now in IDLE with
Python 2.1a2 (#1, Mar 1 2001, 00:10:25)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on
linux2
Type "copyright", "credits" or "license" for more
information.
IDLE 0.6 -- press F1 for help
>>> from pydoc import help
>>> help('atexit')
Help on module atexit:
NAME
atexit
...
and it worked fine.
I bet you tried "help('sys')", didn't you? That clobbers
sys.stdin and sys.stdout by reloading 'sys'. Not sure what
to do about that. I suppose i could just add a special case
to never reload built-in modules.
-- ?!ng
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=405553&group_id=5470