This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Dima.Tisnek, Mariatta, davide.rizzo, docs@python, ezio.melotti, ncoghlan, nedbat, r.david.murray
Date 2016-10-05.15:18:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Yeah, I never found a good place to document this, hence the relatively sparse references in the "using" docs.

The most complete official docs for these features are actually in runpy:


run_module is a thin wrapper around the same core code that actually implements the -m switch

run_path is a Python level reimplementation of the __main__ execution logic

There's also on my blog and the explanation of the options that need to be supported in PEP 432:

A lot of the confusion stems from the fact that directory & zipfile execution was added without a PEP back in 2.6 (it was just a normal tracker issue) and we forgot to add it to the What's New document. We hoped the inclusion of the zipapp module in Python 3.5 via PEP 441 might help resolve that lack of awareness, but it doesn't seem to have had much impact.
Date User Action Args
2016-10-05 15:18:31ncoghlansetrecipients: + ncoghlan, nedbat, ezio.melotti, r.david.murray, docs@python, davide.rizzo, Dima.Tisnek, Mariatta
2016-10-05 15:18:31ncoghlansetmessageid: <>
2016-10-05 15:18:31ncoghlanlinkissue24632 messages
2016-10-05 15:18:31ncoghlancreate