Message144049
When creating a .pyo file (either with -O or -OO) and removing any .pyc or .py original file, import <module_name> complains with "No module called <module_name>". The import does work with .pyc files.
I'm not sure that this is the correct behavior, as the documentation does not seem to make any difference between .pyc and .pyo files on this point:
"It is possible to have a file called spam.pyc (or spam.pyo when -O is used) without a file spam.py for the same module. This can be used to distribute a library of Python code in a form that is moderately hard to reverse engineer." |
|
Date |
User |
Action |
Args |
2011-09-14 20:32:43 | lebigot | set | recipients:
+ lebigot |
2011-09-14 20:32:43 | lebigot | set | messageid: <1316032363.3.0.192750692303.issue12982@psf.upfronthosting.co.za> |
2011-09-14 20:32:42 | lebigot | link | issue12982 messages |
2011-09-14 20:32:42 | lebigot | create | |
|