Last Updated: September 27, 2019
·
1.476K
· Gabriel Falcão

Never have to clear old *.pyc files again

Just export this environment variable:

export PYTHONDONTWRITEBYTECODE=x

You might want to add it to your ~/.bash_profile (mac) or ~/.bashrc (GNU/Linux) so you never have to worry about *.pyc files ever again

I've been doing this for months now and it makes absolutelly no difference for me.

When developing applications in my machine I don't care about any optimizations of python code, in production it will be run optimized already so, again, it makes no difference

1 Response
Add your response

You will have to clear them once thought (once and for all :P)

over 1 year ago ·