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 lebigot
Recipients lebigot
Date 2011-09-14.20:32:42
SpamBayes Score 7.2096645e-07
Marked as misclassified No
Message-id <1316032363.3.0.192750692303.issue12982@psf.upfronthosting.co.za>
In-reply-to
Content
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."
History
Date User Action Args
2011-09-14 20:32:43lebigotsetrecipients: + lebigot
2011-09-14 20:32:43lebigotsetmessageid: <1316032363.3.0.192750692303.issue12982@psf.upfronthosting.co.za>
2011-09-14 20:32:42lebigotlinkissue12982 messages
2011-09-14 20:32:42lebigotcreate