Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #13248 > unrolled thread
| Started by | Jack Bates <jack.bates@gmail.com> |
|---|---|
| First post | 2011-09-13 15:27 -0700 |
| Last post | 2011-09-13 15:27 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
ImportError: cannot import name dns Jack Bates <jack.bates@gmail.com> - 2011-09-13 15:27 -0700
| From | Jack Bates <jack.bates@gmail.com> |
|---|---|
| Date | 2011-09-13 15:27 -0700 |
| Subject | ImportError: cannot import name dns |
| Message-ID | <mailman.1091.1315952854.27778.python-list@python.org> |
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
Back to top | Article view | comp.lang.python
csiph-web