Revision: 27644
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27644
Author:   campbellbarton
Date:     2010-03-21 15:56:26 +0100 (Sun, 21 Mar 2010)

Log Message:
-----------
[#21682] help() doesn't work in the console
replace pydoc's pager function so the console's input isnt used.

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bpy/__init__.py

Modified: trunk/blender/release/scripts/modules/bpy/__init__.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/__init__.py       2010-03-21 
14:46:43 UTC (rev 27643)
+++ trunk/blender/release/scripts/modules/bpy/__init__.py       2010-03-21 
14:56:26 UTC (rev 27644)
@@ -50,6 +50,13 @@
     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


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to