Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-04-25 08:06:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-25 08:06:34 +0400
commit95c2b3297e21ef08a27ad29be9b3bb5a6d90b9e0 (patch)
tree89d87418de83329ae485417d644e57bd387489b0
parent708667c6f6695b04f613566c4ff1b6c2788ab50c (diff)
workaround for (what looks like) a bug in python's StringIO module. should investigate further but for now this works.
-rw-r--r--release/scripts/op/console_python.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/release/scripts/op/console_python.py b/release/scripts/op/console_python.py
index 6a235e118ce..99654505c17 100644
--- a/release/scripts/op/console_python.py
+++ b/release/scripts/op/console_python.py
@@ -55,6 +55,13 @@ def get_console(console_id):
try:
console, stdout, stderr = consoles[console_id]
+
+ # XXX, bug in python 3.1.2 ?
+ # seems there is no way to clear StringIO objects for writing, have to make new ones each time.
+ import io
+ stdout = io.StringIO()
+ stderr = io.StringIO()
+
except:
namespace = {'__builtins__': __builtins__, 'bpy': bpy}
console = InteractiveConsole(namespace)
@@ -190,7 +197,7 @@ def banner(context):
add_scrollback("Execute: Enter", 'OUTPUT')
add_scrollback("Autocomplete: Ctrl+Space", 'OUTPUT')
add_scrollback("Ctrl +/- Wheel: Zoom", 'OUTPUT')
- add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, mathutils, Geometry", 'OUTPUT')
+ add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, mathutils, geometry", 'OUTPUT')
add_scrollback("", 'OUTPUT')
add_scrollback(" WARNING!!! Blender 2.5 API is subject to change, see API reference for more info.", 'ERROR')
add_scrollback("", 'OUTPUT')