[Tutor] automatically extending PYTHONPATH?

Kent Johnson kent37 at tds.net
Tue Mar 22 00:54:32 CET 2005


Kent Johnson wrote:
> As Liam suggested, you can walk the dir yourself and modify sys.path. 
> The walk code could be in a site-customize.py file in site-packages so 
> it will be run automatically every time Python starts up.

Oops, as Brian correctly pointed out, the correct file name is sitecustomize.py. Anything you put in 
this file will be run at startup. The file can be anywhere on the Python path; site-packages is a 
good place for it.

Kent



More information about the Tutor mailing list