On Tue, Jul 10, 2012 at 5:51 PM, Amaury Forgeot d'Arc email@example.com wrote:
2012/7/10 anatoly techtonik firstname.lastname@example.org:
Wow! Nice, but still a hack. I doubt many people wouls accept magic files messing in the root dir of the package. The only way it will look good is:
python -m update_sdk.zip sdk_update[.py]
but I don't know if that's supported.
-m does work with zip files (with a __main__.py file) and command line arguments are passed. Or did you expect another kind of support?
-m doesn't handle zip files - you just execute them directly:
python <script> = source files, bytecode files, directories, zip files (requires a top level __main__.py in the latter two cases) python -m <module> = modules, packages (requires a __main__ submodule for the latter case)
The switch is only to tell the interpreter whether you're providing a filesystem path (default) or a Python module name (-m switch).