what is __init__.py used for?

Lutz Horn lutz.horn at gmx.de
Tue Jul 5 04:46:07 EDT 2005


* zelzel.zsu at gmail.com:
> root\
>     system1\
>         __init__.py
>         utilities.py
>         main.py
>         other.py
...
>    I was wonderring ... what is the __init__.py used for ?
>    This question may seems to be stupid for an expert.

The __init__.py is needed for Python to recognize the system1 directory
as an importable module.

Lutz




More information about the Python-list mailing list