Can I run the python interpreter without generating the compiled .pyc files?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From "What’s New in Python 2.6 – Interpreter Changes":
So run your program as
python -B prog.py.Update 2010-11-27: Python 3.2 addresses the issue of cluttering source folders with
.pycfiles by introducing a special__pycache__subfolder, see What’s New in Python 3.2 – PYC Repository Directories.NOTE: The default behavior is to generate the bytecode and is done for "performance" reasons (for more information see here for python2 and see here for python3).
PYTHONDONTWRITEBYTECODE=1can be bad for python performance (for python2 see https://www.python.org/dev/peps/pep-0304/ and for python3 see https://www.python.org/dev/peps/pep-3147/ ).