Question on making names visible in packages
Roger Binns
rogerb at rogerbinns.com
Sun Mar 14 18:36:51 EST 2004
> However, I'm only able to get this behavior when I leave the
> class definitions in the __init__.py file. When in other files,
> they of course have to be referenced as :
Make your init.py be like this:
from filename1 import *
from filename2 import *
from filename3 import *
If you don't want lots of namespace pollution, you can import
only the symbols you want to export in the package namespace.
Roger
More information about the Python-list
mailing list