diff Lib/idlelib/PyShell.py @ 44380:08468a263a95

help() was not paging to the shell. Issue1650.
author Kurt B. Kaiser <kbk@shore.net>
date Fri, 28 Dec 2007 03:57:56 +0000
parents 541052b044f0
children aed698c8647b
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py	Fri Dec 28 01:24:22 2007 +0000
+++ b/Lib/idlelib/PyShell.py	Fri Dec 28 03:57:56 2007 +0000
@@ -828,6 +828,14 @@
             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)
         #