diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-21 17:56:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-21 17:56:26 +0300 |
commit | 247b7249bd14f370aad991f176a1aafb5acefc45 (patch) | |
tree | aba26ed4591a18f82cffe820a4d2a3f022779407 /release | |
parent | 49493dec557dfee46c0a29bdd81444f51bcef914 (diff) |
[#21682] help() doesn't work in the console
replace pydoc's pager function so the console's input isnt used.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/bpy/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
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 |