It seems that sometimes when I pull from the git the old .pyc
runs instead of the new pulled .py
file is there a way to automatically clear the .pyc
file so it runs always the fresh version ?
The old .pyc
is automatically cleared by Python, provided the modified date on the .py
file is newer.
You could manually delete all .pyc
files in a directory structure with:
find . -name \*.pyc -delete
and Python will re-create them as modules are imported. You can also run:
python -m compileall .
to force a compilation.