[IronPython] IronPython 2 Bug - code module and InteractiveInterpreter (stdout swallowed or not appearing)

Michael Foord fuzzyman at voidspace.org.uk
Wed Sep 19 14:50:41 CEST 2007


Hello all,

There is an annoying bug with IronPython 2 which is blocking me from 
implementing an 'interactive interpreter in the browser'.

I'm afraid I can only show how to reproduce the bug rather than diagnose 
the cause.

When executing code with the 'InteractiveInterpreter' class from the 
standard library code module, the result of the last expression is sent 
to stdout. This mirrors the behaviour of the normal Python interactive 
interpreter.

In IronPython 1.1 this works fine - and I can trap the output by 
replacing 'sys.stdout' with my own Python object.

In IronPython 2, this output just doesn't appear. :-(

If you run 'test_console.py' (with the other attached files in the same 
directory) with IronPython 1.1 it will print the following line to 
standard out "Received (out) : 3Received (out) :".

If you run it with IronPython 2 (I've tried it with both Silverlight and 
2.0a4) it outputs nothing.

This is a darn shame because having an interactive interpreter in the 
browser is way cool...

Michael Foord
http://www.manning.com/foord

 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_console.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070919/76ab94bf/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: traceback.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070919/76ab94bf/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: types.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070919/76ab94bf/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: __future__.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070919/76ab94bf/attachment-0003.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ipcode.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070919/76ab94bf/attachment-0004.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ipcodeop.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070919/76ab94bf/attachment-0005.ksh>


More information about the Ironpython-users mailing list