Message252671
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 script.py 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:57 | terry.reedy | set | recipients:
+ terry.reedy, brett.cannon, eric.araujo, r.david.murray, proski |
2015-10-09 22:13:57 | terry.reedy | set | messageid: <1444428837.39.0.595078951517.issue25303@psf.upfronthosting.co.za> |
2015-10-09 22:13:57 | terry.reedy | link | issue25303 messages |
2015-10-09 22:13:57 | terry.reedy | create | |
|