[Python-Dev] Add a -z interpreter flag to execute a zip file
Phillip J. Eby
pje at telecommunity.com
Sat Jul 14 15:58:56 CEST 2007
At 02:58 PM 7/14/2007 +1200, Greg Ewing wrote:
>Andy C wrote:
> > What does "if __name__ == '__main__" mean in
> > __main__.py? : ) If someone tries does import __main__ from another
> > module in the program, won't that result in an infinite loop?
>Is there a reason not to use __init__.py for this?
Even some moderately-experienced Python developers confuse the
concepts of "package" and "directory containing Python code" -- let's
not make it worse by encouraging the inclusion of an __init__ module
in the top-level package namespace!
More information about the Python-Dev