[IronPython] Import strangeness

Sanghyeon Seo sanxiyn at gmail.com
Mon Aug 28 12:12:09 CEST 2006


$ ipy test.py
1
$ python test.py
2

File contents follow: note that doing "import y" instead of
"__import__" changes the result.

# test.py
import x.y

# x/__init__.py
#empty

# x/y.py
a = 1
y = __import__('y')
print y.a

# y.py
a = 2



More information about the Ironpython-users mailing list