I would like to prevent python from automatically creating __pycache__ directories. From some searching, I have learned that I need to set the PYTHONDONTWRITEBYTECODE python environment variable.
In a Windows environment, is this set the exact same way I would set any other system environmental variable (such as PATH)? If not, how can I set this variable so that any time I run python this is set?
Err, the simple answer while trying to make this at least 30chars is – Yes. (It doesn’t matter what it’s set to, as long as it’s set – although 1 would probably be reasonable).
If you don’t want to do it on a system level/user level basis, then you can always run python with the
-Boption.