You&#39;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">&lt;<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>&gt;</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 &#39;check.py&#39; containing:<br>
<br>
def check(module):<br>
 &nbsp; print module.Keys<br>
<br>
If you also have a &#39;stuff.py&#39; module containing:<br>
<br>
Keys = 3<br>
<br>
You get the following exception:<br>
<br>
&gt;&gt;&gt; import stuff<br>
&gt;&gt;&gt; from check import check<br>
&gt;&gt;&gt; check(stuff)<br>
Traceback (most recent call last):<br>
&nbsp;File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
&nbsp;File &quot;C:\Dev\buildshare\Ipy2-43712-binaries\check.py&quot;, line 2, in check<br>
AttributeError: &#39;module&#39; object has no attribute &#39;Keys&#39;<br>
<br>
(Interestingly &#39;Keys&#39; 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&#39;t blocking us as adding &#39;import clr&#39; 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 &amp; 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>