Hello everyone ..

Im new in python and i have a question !

How to compile myfile.py to myfile.pyo ?

Can you give me an example script coz i dont know were to put python -0 to compile it into pyo !

Thanks a lot ..

6 Years
Discussion Span
Last Post by M.S.

im using pys60 and i want to compile myfile.py to myfile.pyo ! Is there a example code on how to compile ? coz i dont have any idea ..


I am not familliar with pys60... I suppose you could manually force a compile.

try making a script that is in the same directory called compileme.py:

import py_compile

save, and run it.

This may end up with a .pyc file, though (it shouldnt be any different, I believe)... and that's also assuming py_compile is included with your distribution of python...


pyo, is os dependent i think, and there is no way to compile a py to pyo on the phone. you can compile or decompile py/pyc files using many apps out there as symbian packages (e.g. BestDeCompiler.sis).
if you make a pyo on pc from a pys60 script, i think it wont run on your phone.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.