[docs] [issue12982] Document that importing .pyo files needs python -O

Michael Herrmann report at bugs.python.org
Tue Jun 12 15:39:33 CEST 2012


Michael Herrmann <mherrmann.at at gmail.com> added the comment:

Dear Eric OL,

I see - I had read your e-mail but because of the similar names I thought the message here was yours too, and thus only replied once. I apologize!

I can of course find a workaround such as renaming .pyo to .pyc. However, I would like to avoid having to modify the distribution of the third party library I am using in any way. The reason is that if a new version of this third party library is released and I have to upgrade to this new version, I will again have to manually do all the changes I had to do for the old version for the new version, and of course some changes won't work any more and there will be problems...

I'm finding it tedious to use the imp-module to read in the .pyo-files by hand and might just fall back to your suggestion. Thank you for it. Nevertheless, I am still hoping that this may be resolved in a future release.

Best,
Michael

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12982>
_______________________________________


More information about the docs mailing list