You're using the version in the IronPython_2_0 folder, yes?<br><br><div class="gmail_quote">On Wed, Nov 19, 2008 at 4:55 AM, Michael Foord <span dir="ltr"><<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello guys,<br>
<br>
It looks like in source code drop 43712 module name lookup is broken if the name is also a .NET member name (presumably of Script or ScriptScope) and clr has not been imported.<br>
<br>
To reproduce have a pure python module called 'check.py' containing:<br>
<br>
def check(module):<br>
print module.Keys<br>
<br>
If you also have a 'stuff.py' module containing:<br>
<br>
Keys = 3<br>
<br>
You get the following exception:<br>
<br>
>>> import stuff<br>
>>> from check import check<br>
>>> check(stuff)<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
File "C:\Dev\buildshare\Ipy2-43712-binaries\check.py", line 2, in check<br>
AttributeError: 'module' object has no attribute 'Keys'<br>
<br>
(Interestingly 'Keys' does appear in the dir of the module.)<br>
<br>
This is causing us problems in the use of unittest that does module introspection. It isn't blocking us as adding 'import clr' causes the problem to go away, but could well cause us other problems (we are still working our way through our last remaining 50 unit test failures in our IronPython 2 port.)<br>
<br>
I have raised this as issue number 19656 on Codeplex:<br>
<br>
<a href="http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19656" target="_blank">http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19656</a><br>
<br>
All the best,<br>
<br>
Michael Foord & Glenn Jones<br>
Resolver Systems<br><font color="#888888">
<br>
-- <br>
<a href="http://www.ironpythoninaction.com/" target="_blank">http://www.ironpythoninaction.com/</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</font></blockquote></div><br>