diff options
Diffstat (limited to 'release/scripts/modules/bpy/__init__.py')
-rw-r--r-- | release/scripts/modules/bpy/__init__.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 12f8e19cef4..1e6db441599 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -43,10 +43,13 @@ def _main(): ## people need to explain how this is even a fix. # _sys.path[:] = filter(None, _sys.path) - # a bit nasty but this prevents help() and input() from locking blender - # Ideally we could have some way for the console to replace sys.stdin but - # python would lock blender while waiting for a return value, not easy :| - _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.Helper.getline = lambda self, prompt: None + pydoc.TextDoc.bold = lambda self, text: text + # if "-d" in sys.argv: # Enable this to measure startup speed if 0: |