[Tutor] Reload my modules dir

Kent Johnson kent_johnson at skillsoft.com
Wed Sep 22 18:55:34 CEST 2004


Two choices:

1. Put your scripts into the folder python/lib/site-packages (not sure what 
the actual path is for you, but lib is the folder where the standard 
library files are found). This folder is automatically added to sys.path.

2. Make a file called sitecustomize.py. Put the file in 
python/lib/site-packages. In the file put the two lines
import sys
sys.path.append('/home/olavi/pythonscripts')

Kent


At 06:16 PM 9/22/2004 +0300, Olavi Ivask wrote:
>Hello
>
>i made a folder(pythonscripts), where i hold my python scripts. Now, i added
>this dir to modules path list
>
> >>>import sys
> >>>sys.path.append('/home/olavi/pythonscripts')
>
>After closing python, my script path dissapears, in sys.path list. How must i
>add this path, that every time i open python, it reloads that dir
>automatically?
>
>i use debian, kernel2.6 and python 2.3.4
>
>Thanks for your response
>
>Olavi Ivask
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list