Why is the following ImportError raised? $ ./test Traceback (most recent call last): File "./test", line 3, in <module> from foo import dns File "/home/jablko/foo/dns.py", line 1, in <module> from foo import udp File "/home/jablko/foo/udp.py", line 1, in <module> from foo import dns ImportError: cannot import name dns $
I reproduce this error with the following four files and five lines: == foo/dns.py == from foo import udp == foo/udp.py == from foo import dns == foo/__init__.py == (empty) == test == #!/usr/bin/env python from foo import dns -- http://mail.python.org/mailman/listinfo/python-list