How to 'from package import module; from module import variable'?
Alex
new_name at mit.edu
Mon Jul 9 09:25:32 EDT 2001
Hi. I've recently switched to using packages. Because I use reload a
lot during testing, it'd be helpful to be able to do this sort of thing
successfully:
>>> from mouse.tools import queues
>>> from queues import Cyclic_queue
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named queues
My understanding of the package import routine is still sort of sketchy,
but I was wondering if there's a way to convince the import function
that queues is actually a module it can import from. I could just make
assignments, but that seems kludgey.
Alex.
More information about the Python-list
mailing list