]> granicus.if.org Git - python/commitdiff
help() was not paging to the shell. Issue1650.
authorKurt B. Kaiser <kbk@shore.net>
Fri, 28 Dec 2007 03:57:56 +0000 (03:57 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Fri, 28 Dec 2007 03:57:56 +0000 (03:57 +0000)
Lib/idlelib/NEWS.txt
Lib/idlelib/PyShell.py
Lib/idlelib/run.py

index d340e66cd408ea6896558675cd359762ca4f94c3..6688c5ac189edc1568de2da69db24cce78939f58 100644 (file)
@@ -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.
 
index 9962894d4d054d137bd1593e6782408394b62baa..434df67b09c65fb7c8dfa826402ccaa87cc55ca0 100644 (file)
@@ -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)
         #
index 9fbe0e9a4a8dbdd54c8e9676b6d81bc4092ee4d4..407e54309d02a725d451e7fabdc0e8b535b5c171 100644 (file)
@@ -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