Currently, I'm working with Python 3.4. How could I avoid .pyc
or .pyo
files (__pycache__
) without editing the commandline?
The following command works perfectly
Using terminal: python3 -B something.py
But these are not working in Python 3 (or are they??):
import os
os.environ['PYTHONDONTWRITEBYTECODE'] = "whatever"
according to the instructions, if it is set to a non-empty string, it should work. But I couldn't.
What am I missing?