No, in fact, Python will use the
.pyc file preferably and only access the
.py file if it a) exists and b) is newer than the
This allows you to distribute a Python app in compiled form without the source code (although it’s not much of a code “obfuscation” technique).
Nope, Python is (intentionally, see below) dumb about this! You can run
find . -name '*.pyc' -delete
from your project directory to get rid of old
- There are errors when I install django by git?
- Install mysql-python return error in CentOs
- Using existing field values in django update query
- Using Django's built in web server in a production environment
- Using materialized views or alternatives in django
The thing you can do to prevent this is to start django with
python -B manage.py runserver
or to automate deletion of pyc, probably with clean_pyc from django-extensions