View Full Version : [SOLVED] .pyc vs. .pyo, what's the difference

December 4th, 2008, 08:12 AM
In Python, I've noticed that there are two different file extensions for compiled scripts. Is there a reason why there are two? What's the difference?

December 4th, 2008, 11:05 AM
This (http://books.google.com/books?id=vpTAq4dnmuAC&pg=PA28&lpg=PA28&dq=pyc+pyo&source=web&ots=AOMdz4Heyv&sig=8uipdWYjIk4fvDyfy1z7XjvelqU) page from Python in a Nutshell on Google Book Search might be able to help you.

December 5th, 2008, 09:09 AM
Thanks for the info Rabbitman. I'm not exactly sure what optimized code means though.

December 5th, 2008, 09:25 AM
Take a look at this (http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html) excerpt from An Introduction to Python. It explains in greater detail about the generation of optimized code in Python.

December 5th, 2008, 10:30 AM
Thanks again, that clears things up for me.