Ezio Melotti added the comment:
I can reproduce on Python 3 on Ubuntu 14.10.
When I hit Ctrl+C I get:
>>> help(range)
...
| __hash__(self, /)
| Return hash(self).
|
:Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/wolf/dev/py/py3k/Lib/_sitebuiltins.py", line 103, in __call__
return pydoc.help(*args, **kwds)
File "/home/wolf/dev/py/py3k/Lib/pydoc.py", line 1833, in __call__
self.help(request)
File "/home/wolf/dev/py/py3k/Lib/pydoc.py", line 1886, in help
else: doc(request, 'Help on %s:', output=self._output)
File "/home/wolf/dev/py/py3k/Lib/pydoc.py", line 1619, in doc
pager(render_doc(thing, title, forceload))
File "/home/wolf/dev/py/py3k/Lib/pydoc.py", line 1409, in pager
pager(text)
File "/home/wolf/dev/py/py3k/Lib/pydoc.py", line 1431, in <lambda>
return lambda text: pipepager(text, 'less')
File "/home/wolf/dev/py/py3k/Lib/pydoc.py", line 1455, in pipepager
pipe.write(text)
File "/home/wolf/dev/py/py3k/Lib/subprocess.py", line 900, in __exit__
self.wait()
File "/home/wolf/dev/py/py3k/Lib/subprocess.py", line 1552, in wait
(pid, sts) = self._try_wait(0)
File "/home/wolf/dev/py/py3k/Lib/subprocess.py", line 1502, in _try_wait
(pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt
>>>
If I keep pressing Enter the rest of the help gets printed. Once the pager is
done, pressing enter doesn't go on a new line and the prompts (>>>) are printed
one after the other on the same line. The same happens on my shell prompt once
I exit from the interpreter. `reset` fixes it.
On Python 2 Ctrl+C does nothing.
----------
nosy: +ezio.melotti
type: crash -> behavior
versions: +Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23792>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com