Frank wrote: > Hi, > > I want to create some modules to use them in my programs. Now the > problem is, how to add the path to these modules permanently to the > python search path. > > For example: > > import sys > sys.path.append('path to my modules') > > > works fine for one session but does not save this path permanently. I > also tried alreday to set the PYTHONPAHT variable to my modules but > for some reason this does not work either. > > Question: > Can one add a permenent path via pathon commands (I checked already > sys, but it does not seem to have a function for this). > > If not, how to do it otherwise. > > It would be great to give the precise commands if someone knows how. > (BTW, I use linux) > Use
export PYTHONPATH=/path/to/module/directory in your shell initialization file. Note that PYTHONPATH (not PYTHONPAHT) must be an /environment/ variable, not just a shell variable. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden Blog of Note: http://holdenweb.blogspot.com See you at PyCon? http://us.pycon.org/TX2007 -- http://mail.python.org/mailman/listinfo/python-list