
On Tue, Jul 10, 2012 at 5:51 PM, Amaury Forgeot d'Arc <amauryfa@gmail.com> wrote:
2012/7/10 anatoly techtonik <techtonik@gmail.com>:
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). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia