rent.lupin.road at gmail.com
Fri Jun 27 00:58:47 EDT 2008
> # a.py
> import b
> # refer to b.b
> # b.py
> import a
> # refer to a.a
Thanks Dan, but that still doesn't work for me I'm afraid...
I renamed the modules avoid name overloading -- a.py is now:
b is now defined, but b.b_mod isn't:
File "main.py", line 1, in <module>
from a import a_mod
File "/Users/james/tmp/python/a/a_mod.py", line 3, in <module>
File "/Users/james/tmp/python/a/a_mod.py", line 4, in A
AttributeError: 'module' object has no attribute 'b_mod'
I must be missing something here - I've tried adding the modules to
__all__ in __init__.py but that didn't help either.
More information about the Python-list