Can I run the python interpreter without generating the compiled .pyc files?
Python can now be prevented from writing .pyc or .pyo files by supplying the -B switch to the Python interpreter, or by setting the PYTHONDONTWRITEBYTECODE environment variable before running the interpreter. This setting is available to Python programs as the
sys.dont_write_bytecodevariable, and Python code can change the value to modify the interpreter’s behaviour.
Update 2010-11-27: Python 3.2 addresses the issue of cluttering source folders with
.pyc files by introducing a special
__pycache__ subfolder, see What's New in Python 3.2 - PYC Repository Directories.