Project organization and import

garylinux at gmail.com garylinux at gmail.com
Wed Mar 7 12:56:04 EST 2007


> package_name/
>      package_pre.py - contains globals for the package
>      component_a.py    - a useful-sized collection of functionality
>      component_b.py    - another
>      component_c.py    - another
>      package_post.py   - stuff that relies on the prior stuff
>      __init__.py       - or you can put the "post" stuff here
>
> Then __init__.py contains something like:
>
> from package_pre import *
> from component_a import *
> from component_b import *
> from component_c import *
> from package_post import *
>
> Anansi Spaceworkshttp://www.AnansiSpaceworks.com

Thank you! That is by far the clearest I have ever seen that
explained.
I saved it and Sent it on to a friend that is learning python.




More information about the Python-list mailing list