what is __init__.py used for?

zelzel.zsu at gmail.com zelzel.zsu at gmail.com
Tue Jul 5 10:31:09 CEST 2005


I am a new learner of Python Programming Language.
Now. I am reading a book.
In the  section relating to module, I see an example.
the directory tree looks like below:
root\
    system1\
        __init__.py
        utilities.py
        main.py
        other.py
    system2\
        __init__.py
        utilities.py
        main.py
        other.py
    system3\                 # Here or elsewhere
        __init__.py           # Your new code here
        myfile.py

question
==========
   I was wonderring ... what is the __init__.py used for ?
   This question may seems to be stupid for an expert.
   But, if you can give the answer, it will be helpful for me.

  thanks.




More information about the Python-list mailing list