mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
help() was not paging to the shell. Issue1650.
This commit is contained in:
parent
c3d7fe0dbe
commit
f609a345a4
3 changed files with 14 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
||||||
What's New in IDLE 3.0a3?
|
What's New in IDLE 3.0a3?
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
*Release date: XX-XXX-200X*
|
*Release date: XX-XXX-2008*
|
||||||
|
|
||||||
|
- help() was not paging to the shell. Issue1650.
|
||||||
|
|
||||||
- CodeContext was not importing.
|
- CodeContext was not importing.
|
||||||
|
|
||||||
|
|
|
@ -828,6 +828,14 @@ class PyShell(OutputWindow):
|
||||||
sys.stdout = self.stdout
|
sys.stdout = self.stdout
|
||||||
sys.stderr = self.stderr
|
sys.stderr = self.stderr
|
||||||
sys.stdin = self
|
sys.stdin = self
|
||||||
|
try:
|
||||||
|
# page help() text to shell.
|
||||||
|
import pydoc # import must be done here to capture i/o rebinding.
|
||||||
|
# XXX KBK 27Dec07 use a textView someday, but must work w/o subproc
|
||||||
|
pydoc.pager = pydoc.plainpager
|
||||||
|
except:
|
||||||
|
sys.stderr = sys.__stderr__
|
||||||
|
raise
|
||||||
#
|
#
|
||||||
self.history = self.History(self.text)
|
self.history = self.History(self.text)
|
||||||
#
|
#
|
||||||
|
|
|
@ -247,6 +247,9 @@ class MyHandler(rpc.RPCHandler):
|
||||||
sys.stdin = self.console = self.get_remote_proxy("stdin")
|
sys.stdin = self.console = self.get_remote_proxy("stdin")
|
||||||
sys.stdout = self.get_remote_proxy("stdout")
|
sys.stdout = self.get_remote_proxy("stdout")
|
||||||
sys.stderr = self.get_remote_proxy("stderr")
|
sys.stderr = self.get_remote_proxy("stderr")
|
||||||
|
# page help() text to shell.
|
||||||
|
import pydoc # import must be done here to capture i/o binding
|
||||||
|
pydoc.pager = pydoc.plainpager
|
||||||
from idlelib import IOBinding
|
from idlelib import IOBinding
|
||||||
sys.stdin.encoding = sys.stdout.encoding = \
|
sys.stdin.encoding = sys.stdout.encoding = \
|
||||||
sys.stderr.encoding = IOBinding.encoding
|
sys.stderr.encoding = IOBinding.encoding
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue