http://www.grabner-online.de/div_into/html/ch09s04s03.html
9.4.3 Example: sitecustomize.py
# sitecustomize.py
# this file can be anywhere in your Python path,
# but it usually goes in ${pythondir}/lib/site-packages/
import sys
sys.setdefaultencoding('iso-8859-1')
![1](http://www.grabner-online.de/images/callouts/1.png) | sitecustomize.py is a special script; Python will try to import it on startup, so any code in it will be run automatically. As the comment mentions, it can go anywhere (as long as import can find it), but it usually goes in the site-packages directory within your Python lib directory. |
![2](http://www.grabner-online.de/images/callouts/2.png) | setdefaultencoding function sets, well, the default encoding. This is the encoding scheme that Python will try to use whenever it needs to auto-coerce a unicode string into a regular string.
|