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 terry.reedy
Recipients brett.cannon, eric.araujo, proski, r.david.murray, terry.reedy
Date 2015-10-09.22:13:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On the side issue: While the example given, which uses the py_compile.compile defaults via the command line interface, is useless, I disagree that writing a .pyc file for a file without .py is a bug.

Python will run python code with any filename as main module (and not write .pyc).  It will only import the *same code* (and normally write .pyc) if the filename ends with .py (or .pyw on windows).  However, 'import script' will import script.pyc (on the search path) without a file existing.  Using py_compile.compile('script', 'script.pyc') makes that possible.  (I just tried it.)

Date User Action Args
2015-10-09 22:13:57terry.reedysetrecipients: + terry.reedy, brett.cannon, eric.araujo, r.david.murray, proski
2015-10-09 22:13:57terry.reedysetmessageid: <>
2015-10-09 22:13:57terry.reedylinkissue25303 messages
2015-10-09 22:13:57terry.reedycreate