<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>The compiler reads your source code and parses it into parse trees. This is first step. It then takes the parse trees and transform them into abstract syntax trees, which are like a DOM tree in an HTML file, and then transform that AST into a control flow graph, and finally a bytecode is produced out of that control flow graph. The pyc files you see are this bytecode, so they are produced at the end. Anytime you edit your .py file, a new .pyc file is created if you invoke the python interpreter myfile.py on the former. If your .py file doesn't change, the .pyc file stays the same.</div><div><br></div>Just like with java, this allows you to write a single .py file that can work on any platform without changing the source file, because all the cross platform issues are handled by the virtual machine.<br><div style="color:
 rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br>________________________________<br> From: Nac Temha <naccttemha@gmail.com><br>To: python-list@python.org <br>Sent: Saturday, January 5, 2013 11:05 PM<br>Subject: Python programming philosophy<br><br><br>Hello,<br><br><br><br>I want to learn working principle of python as broadly. How to interpret the python?  For example, what is pyc files and when does it occur?<br>Can you explain them? Thanks in advance.<br>-- <br><a target="_blank" href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a></div> </div></body></html>