Issue 17359: Mention "main.py" explicitly in command line docs (original) (raw)
Created on 2013-03-05 19:40 by lemburg, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 26883 | jack__d,2021-08-22 19:51 |
Messages (10) | ||
---|---|---|
msg183550 - (view) | Author: Marc-Andre Lemburg (lemburg) * ![]() |
Date: 2013-03-05 19:40 |
The feature to run a ZIP file containing Python modules is not documented. It was implemented in Python 2.6: * http://bugs.python.org/issue1739468 and mentioned in the "What's new": * http://docs.python.org/2/whatsnew/2.6.html?highlight=python%20run%20zip%20files#other-language-changes but searching the documentation for "__main__.py" returns 0 hits in the docs (for Python 2.7 and 3.4). I guess "python dir" should also be mentioned somewhere... | ||
msg183551 - (view) | Author: Eli Bendersky (eli.bendersky) * ![]() |
Date: 2013-03-05 19:48 |
From http://docs.python.org/3/using/cmdline.html: Package names are also permitted. When a package name is supplied instead of a normal module, the interpreter will execute .__main__ as the main module. This behaviour is deliberately similar to the handling of directories and zipfiles that are passed to the interpreter as the script argument. This is for "-m" Also: |