diff options
-rw-r--r-- | Lib/idlelib/NEWS.txt | 4 | ||||
-rw-r--r-- | Lib/idlelib/PyShell.py | 8 | ||||
-rw-r--r-- | Lib/idlelib/run.py | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index d340e66..6688c5a 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -1,7 +1,9 @@ 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. diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 9962894..434df67 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -828,6 +828,14 @@ class PyShell(OutputWindow): sys.stdout = self.stdout sys.stderr = self.stderr 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) # diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 9fbe0e9..407e543 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -247,6 +247,9 @@ class MyHandler(rpc.RPCHandler): sys.stdin = self.console = self.get_remote_proxy("stdin") sys.stdout = self.get_remote_proxy("stdout") 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 sys.stdin.encoding = sys.stdout.encoding = \ sys.stderr.encoding = IOBinding.encoding |