Message171743
Problem is only 2.7.3 (not 3.2.3, 3.3.0), tested on Windows
Command Line Window
>>> help()
...
help> _
The _ is blinking, waiting for input.
IDLE Shell
>>> help()
...
help>
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
help()
File "C:\Programs\Python27\lib\site.py", line 467, in __call__
return pydoc.help(*args, **kwds)
File "C:\Programs\Python27\lib\pydoc.py", line 1750, in __call__
self.interact()
File "C:\Programs\Python27\lib\pydoc.py", line 1762, in interact
request = self.getline('help> ')
File "C:\Programs\Python27\lib\pydoc.py", line 1773, in getline
return raw_input(prompt)
UnsupportedOperation: readline
There is no blinking _, at that is from the raw_input() call that failed. There is no problem with help() in IDLE for 3.2, 3.3.
I see two possibilities:
1. This has nothing to do with Idle directly, but is a problem with pythonw and raw_input/readline that was later fixed.
2. This is a result of how stdin is proxied by Idle and that there is a difference between 2.7 and 3.x.
builtin_raw_input in bltinmodule.c calls
s = PyOS_Readline(PyFile_AsFile(fin), PyFile_AsFile(fout), prompt);
and I presume PyOS_Readline eventually calls fin.readline()
UnsupportedOperation is defined (in 2.7, at least) in _pyio.py
_pyio._unsupported(self, name) raises it with names.
That in turn is the default body for every operation. In particular,
def readline(self):
self._unsupported("readline")
So I presume 2. is the problem and the proxy in the pythonw process is an io subclass that needs readline defined for help() to work.
(Is proxying same on all OSes? Or would problem be Windows only?) |
|
Date |
User |
Action |
Args |
2012-10-01 20:01:13 | terry.reedy | set | recipients:
+ terry.reedy, roger.serwy |
2012-10-01 20:01:13 | terry.reedy | set | messageid: <1349121673.49.0.0542189425732.issue16103@psf.upfronthosting.co.za> |
2012-10-01 20:01:13 | terry.reedy | link | issue16103 messages |
2012-10-01 20:01:12 | terry.reedy | create | |
|