[IronPython] Import Bug with 1.0 Beta 9

Jesse Granden jesse.granden at gmail.com
Mon Jul 24 00:05:46 CEST 2006


Hi,

I ran across this while trying to get sqlalchemy working with IronPython.
If a package's __init__.py defines a method with the same name as a module
in that package, you can't import the module.

example:
test.py::
import foo.bar as b
print b


foo/__init__.py::
def bar():
    pass

foo/bar.py::
pass


-----------------------------
C:\IronPython-1.0-Beta9>python test.py
<module 'foo.bar' from 'C:\IronPython-1.0-Beta9\foo\bar.py'>

C:\IronPython-1.0-Beta9>ipy test.py
<function bar at 0x000000000000002B>

-------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060723/b21fc244/attachment.html>


More information about the Ironpython-users mailing list