[IronPython] "exec in" is broken
Patrick O'Brien
sum.ergo.code at gmail.com
Mon Nov 20 23:25:01 CET 2006
There is a problem doing an "import *" within code that is exec'd in a
dictionary:
>>> from sys import *
>>> print platform
cli
>>> import imp
>>> module = imp.new_module('foo')
>>> source = 'from sys import *\nprint platform\n'
>>> code = compile(source, 'foo', 'exec')
>>> exec code in module.__dict__
Traceback (most recent call last):
File , line 0, in <stdin>##97
File , line 0, in foo##96
NameError: name 'platform' not defined
>>>
I created a ticket for this:
http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5800
--
Patrick K. O'Brien
Orbtech http://www.orbtech.com
Schevo http://www.schevo.org
Louie http://www.pylouie.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20061120/cd5243b1/attachment.html>
More information about the Ironpython-users
mailing list