Simple Python Project Structure

jay graves jaywgraves at gmail.com
Sat Oct 11 03:26:51 CEST 2008


On Oct 10, 7:17 pm, amit <amit.ut... at gmail.com> wrote:
> How do create my own modules and import them? Right now it works but
> they all have to be in the same directory. For example,
>
> project/
> ....util/
> ....config/
> ....tests/
> ....start.py
>

You need an __init__.py file (it doesn't matter if it's empty) in the
directory to turn it into a package.

http://www.python.org/doc/2.5.2/tut/node8.html#SECTION008400000000000000000

HTH.

...
Jay Graves



More information about the Python-list mailing list