Can I have all of my python scripts cached bytecode, e.g. under a central directory tree in my home directory?

Viewed 587

I do not necessarily want to stop python from "caching" its byte code, I just want to stop it from "crippling" all of my directories with a __pycache__ entry anywhere it finds and executes a script. For instance, I'd like the byte code of all of my scripts to be saved under, say $HOME/.python/cache.

I'm running Linux but I believe that would be interesting for Windows users as well.

1 Answers
Related