I start using Django in PyCharm recently with git. Sometimes I have problem with running the server it shows some errors which I fixed. In order to solve this problem I should every time manually remove .pyc files. And run server again. How I can force it two override .pyc files every time when I compile my source?
Thanks for @jbat100 and @Leonardo.Z. I figured it out. I pass PYTHONDONTWRITEBYTECODE=1. And it work as a magic. However sadly I can just accept only one answer I hope @jbat100 will not be angry with me.
Since Python 2.6 Python can be prevented from writing .pyc or .pyo files by supplying the -B switch to the Python interpreter, or by setting the PYTHONDONTWRITEBYTECODE environment variable before running the interpreter.
This setting is available to Python programs as the sys.dont_write_bytecode variable
, and Python code can change the value to modify the interpreter’s behaviour. via: Interpreter Changes