I'm doing some AST modifications in Python. This may be done for optimization purpose or other.
Where is the right place to put it, so when you do something like:
python myfile.py
or
python runserver.py 开发者_Go百科myapp
the modifications took place for every .py executed file?
Put your modifications in a site.py
or sitecustomize.py
(Python < 2.6) file (in the lib/site-packages
directory ; Python will try to import and run it @ interpreter startup).
精彩评论