From 247b7249bd14f370aad991f176a1aafb5acefc45 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 21 Mar 2010 14:56:26 +0000 Subject: [PATCH] [#21682] help() doesn't work in the console replace pydoc's pager function so the console's input isnt used. --- release/scripts/modules/bpy/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 8f6bada6561..f0025290f09 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -50,6 +50,13 @@ def _main(): if not app.debug: _sys.stdin = None + # because of how the console works. we need our own help() pager func. + # replace the bold function because it adds crazy chars + import pydoc + pydoc.getpager = lambda: pydoc.plainpager + pydoc.TextDoc.bold = lambda self, text: text + + # if "-d" in sys.argv: # Enable this to measure startup speed if 0: import cProfile