Re: [Tutor] how to add directory to python search list

2011-07-17 Thread ALAN GAULD
It depends on what shell you are using. Most beginners use the Bash shell and for that you need to open your .bash_profile (or .bashrc, I can't recall the preferred one for env vars...) and add a line like: export PYTHONPATH=$PYTHONPATH:/path/to/my/python/modules Next time you login Python shou

Re: [Tutor] how to add directory to python search list

2011-07-17 Thread Surya P.K. Kasturi
Thanks a lot. your posts are really helpful. On Sun, Jul 17, 2011 at 4:41 PM, Steven D'Aprano wrote: > Surya P.K. Kasturi wrote: > > can you tell me in detail how to do this. >> I am new to linux. >> > > "this" being: > > On Sat, Jul 16, 2011 at 11:48 AM, Alan Gauld * >> *wrote: >> >>> You need

Re: [Tutor] how to add directory to python search list

2011-07-17 Thread Steven D'Aprano
Surya P.K. Kasturi wrote: can you tell me in detail how to do this. I am new to linux. "this" being: On Sat, Jul 16, 2011 at 11:48 AM, Alan Gauld wrote: You need to add the folder to your PYTHONPATH environment variable. You usually do this your .login or .profile file. Python will add the

Re: [Tutor] how to add directory to python search list

2011-07-17 Thread Peter Otten
Surya P.K. Kasturi wrote: > OS : Ubuntu Linux > Python Version : 2.6.4 > > I have some third party modules to be installed in my computer. > So, I want to add the module directory to python search list. The way I find most convenient is to create a text file with the .pth suffix in a directory t

Re: [Tutor] how to add directory to python search list

2011-07-16 Thread Surya P.K. Kasturi
Mr. Gauld can you tell me in detail how to do this. I am new to linux. On Sat, Jul 16, 2011 at 11:48 AM, Alan Gauld wrote: > Surya P.K. Kasturi wrote: > >> OS : Ubuntu Linux >> Python Version : 2.6.4 >> >> I have some third party modules to be installed in my computer. >> So, I want to add the m

Re: [Tutor] how to add directory to python search list

2011-07-16 Thread Alan Gauld
Surya P.K. Kasturi wrote: OS : Ubuntu Linux Python Version : 2.6.4 I have some third party modules to be installed in my computer. So, I want to add the module directory to python search list. I used : *>>> import sys* *>>> sys.path.append('directory address')* * * this could do my work but as

[Tutor] how to add directory to python search list

2011-07-16 Thread Surya P.K. Kasturi
OS : Ubuntu Linux Python Version : 2.6.4 I have some third party modules to be installed in my computer. So, I want to add the module directory to python search list. I used : *>>> import sys* *>>> sys.path.append('directory address')* * * this could do my work but as soon as I close the termina