- Scrollbars for the console (use View2D functions)
[blender-staging.git] / release / ui / space_console.py
index 6548a2249b23550a00f8be172dd0fda6657c457e..7d8ea3018c4a9cdbe52f34d4f298b5e646b56d15 100644 (file)
@@ -50,7 +50,7 @@ def get_console(console_id):
        
        console_id can be any hashable type
        '''
-       import sys, code, io
+       import sys, code
        
        try:    consoles = get_console.consoles
        except:consoles = get_console.consoles = {}
@@ -72,9 +72,11 @@ def get_console(console_id):
                console = code.InteractiveConsole(namespace)
                
                if sys.version.startswith('2'):
-                       stdout = io.BytesIO()  # Py2x support
-                       stderr = io.BytesIO()
+                       import cStringIO
+                       stdout = cStringIO.BytesIO()  # Py2x support
+                       stderr = cStringIO.BytesIO()
                else:
+                       import io
                        stdout = io.StringIO()
                        stderr = io.StringIO()