shawn bright schrieb: > lo there, > > i am working with python in ubuntu, my app has some modules that i would > like to import from anywhere. > i can sys.path.append(my_module_dir) but it only lasts as long as > that python session. > how can i add a directory to the import path permantly
http://article.gmane.org/gmane.comp.python.tutor/36916 See point 2) Addendum: To set the PYTHONPATH environment variable: Windows: "Control panel/System/Advanced/Envirnment..." or something similar and change/add value of PYTHONPATH (entries are separated by semicolons ';') Linux: Depends on your distribution: - Standard way would be to edit ~/.bash_profile and add e.g. # entries are separated by colons ':' PYTHONPATH=$HOME/lib/python:/where/my/other/python/modules/live export PYTHONPATH but not all desktop environment read this file. - On Debian, for the system wide environment, you can add the same snippet to /etc/environment or add a file with the same contents to /etc/profile.d HTH, Chris _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor