python classes/file structure

Steve Holden steve at holdenweb.com
Thu Apr 21 14:13:37 EDT 2005


codecraig wrote:
> Thanks, but I am not familiar with the "__all__" variable, could u give
> me an example?
> 
> Without using, __all__....would i do this in my __init__.py?
> 
> import MyCustomWidget1
> import MyCustomWidget2
> import MyCustomWidget3
> 
> etc?
> 
Yes, correct. __all__ just limits the names that are imported into the 
receiving namespace with "from module import *".

regards
  Steve
-- 
Steve Holden        +1 703 861 4237  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/
Python Web Programming  http://pydish.holdenweb.com/




More information about the Python-list mailing list