[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21640] branches/blender2.5/blender/ release/ui/space_console.py: grr, py 2.5 2.6 and 3. x need different StringIO's

lguillaume lecocqguillaume at gmail.com
Fri Jul 17 01:42:31 CEST 2009


Hi, with the console inside Blender, it is possible to remove the dos
window, for windows system?

2009/7/17 Campbell Barton <ideasman42 at gmail.com>

> Revision: 21640
>
> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21640
> Author:   campbellbarton
> Date:     2009-07-17 01:04:29 +0200 (Fri, 17 Jul 2009)
>
> Log Message:
> -----------
> grr, py 2.5 2.6 and 3.x need different StringIO's
>
> Modified Paths:
> --------------
>    branches/blender2.5/blender/release/ui/space_console.py
>
> Modified: branches/blender2.5/blender/release/ui/space_console.py
> ===================================================================
> --- branches/blender2.5/blender/release/ui/space_console.py     2009-07-16
> 22:47:27 UTC (rev 21639)
> +++ branches/blender2.5/blender/release/ui/space_console.py     2009-07-16
> 23:04:29 UTC (rev 21640)
> @@ -71,14 +71,19 @@
>
>                console = code.InteractiveConsole(namespace)
>
> -               if sys.version.startswith('2'):
> -                       import cStringIO
> -                       stdout = cStringIO.BytesIO()  # Py2x support
> -                       stderr = cStringIO.BytesIO()
> -               else:
> +               if sys.version.startswith('3'):
>                        import io
>                        stdout = io.StringIO()
>                        stderr = io.StringIO()
> +               elif sys.version.startswith('2.6'):
> +                       import io
> +                       stdout = io.BytesIO()  # Py2x support
> +                       stderr = io.BytesIO()
> +               else:
> +                       import cStringIO
> +                       stdout = cStringIO.StringIO()
> +                       stderr = cStringIO.StringIO()
> +
>
>                consoles[console_id]= namespace, console, stdout, stderr
>
>
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>


More information about the Bf-committers mailing list