[issue12982] .pyo file cannot be imported

2011-09-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Eric, you can initially give a doc patch as text in a message, though an actual diff in nicer and may get action sooner. I agree that something could be added. Perhaps the quote "It is possible" should be followed with something like "However, one must us

[issue12982] .pyo file cannot be imported

2011-09-15 Thread STINNER Victor
STINNER Victor added the comment: > Indeed. Thanks. I wish it had been in the documentation. :) This is yet > another reason for me to check how I can submit patches to the doc. :) Read http://docs.python.org/devguide/ to learn how to get the source of the documentation and how to write a

[issue12982] .pyo file cannot be imported

2011-09-15 Thread Eric O. LEBIGOT
Eric O. LEBIGOT added the comment: Indeed. Thanks. I wish it had been in the documentation. :) This is yet another reason for me to check how I can submit patches to the doc. :) I also found out that renaming the .pyo file as .pyc makes Python happy upon import. That's the solution I chos

[issue12982] .pyo file cannot be imported

2011-09-14 Thread STINNER Victor
STINNER Victor added the comment: You need to run Python with -O command line option to ask Python to search for *.pyo files. -- nosy: +haypo ___ Python tracker ___ ___

[issue12982] .pyo file cannot be imported

2011-09-14 Thread Eric O. LEBIGOT
New submission from Eric O. LEBIGOT : When creating a .pyo file (either with -O or -OO) and removing any .pyc or .py original file, import complains with "No module called ". The import does work with .pyc files. I'm not sure that this is the correct behavior, as the documentation does not