Convert PY File into a PYO file - in Python
<p>Sorry if this is a simple question. I am trying to convert (compile) a PY file into a PYO file. I have found this:</p>

<p><a href="http://stackoverflow.com/questions/2042426/compile-python-py-file-without-executing">compile python .py file without executing</a></p>

<p>And it says I should just be able to run "python" and then I can add additional flags such as -O</p>

<p>in the past I have always right-clicked on my py script and chose "Compile" and it generated the pyo file, but I have recently gotten the newest version of python for windows and now I don't have this option when I right click on my file.</p>

<p>I have tried opening the command prompt on windows (I'm more of a linux guy), tried cd ing into the directory where my script is and running "python -O myscript.py" but it says</p>

<p>'python' is not recognized as an internal or external command,
operable program or batch file.</p>

<p>Any advice would be really helpful! thank you</p>
