[IronPython] compile bug

Dino Viehland dinov at exchange.microsoft.com
Wed Mar 12 01:05:18 CET 2008


I'll take a look and get back to you.  Recompiling the dynamic silverlight bits might be a bit of a pain though (there's a bunch of internal process required to ship out binaries).

One option might be to use the Parser class directly but I don't know if that'll help you too much.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Tuesday, March 11, 2008 3:10 PM
To: Discussion of IronPython
Subject: [IronPython] compile bug

Hello guys,

There is a bug in the Python compile function relating to the
'PyCF_DONT_IMPLY_DEDENT' flag (which was added to support the standard
library 'code' module.


Python 2.5:

>>> compile('def f():\n    print "hi"\n\n', '<input>', 'single',
PyCF_DONT_IMPLY_DEDENT)
<code object <module> at 011572F0, file "<input>", line 1>

IronPython 2a8
>>> compile('def f():\n    print "hi"\n\n', '<input>', 'single',
PyCF_DONT_IMPLY_DEDENT)
  File "<input>", line 4

    ^
SyntaxError: invalid syntax

Unfortunately this prevents me implementing an interactive interpreter
in Silverlight 2 using code.InteractiveConsole. :-(

If there is *any* way this can be fixed in a version of dynamic
silverlight then we can still have this for PyCon. ;-)

All the best,

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

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list