Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Kent Johnson
On Wed, Aug 19, 2009 at 4:37 PM, Jramak wrote: > I > also looked at virtualenv http://pypi.python.org/pypi/virtualenvĀ . Each > virtual env takes up 2.3 MB. To me this seems a bit of overkill, but this > will enable you to run Python24, Python25, Python26 etc specific code on one > computer. You do

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Kent Johnson
On Wed, Aug 19, 2009 at 4:41 PM, Jramak wrote: >> >> Sorry, I mean put the packages in the same directory as the python >> script that needs them. The search path is sys.path which is affected >> by PYTHONPATH among other things... >> >> > > > sys.path is affected by PYTHONPATH ? how could it be af

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Jramak
> > > Sorry, I mean put the packages in the same directory as the python > script that needs them. The search path is sys.path which is affected > by PYTHONPATH among other things... > > > sys.path is affected by PYTHONPATH ? how could it be affected by the PYTHONPATH ? Could you pls enlighten me

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Jramak
Thanks for all the insight, everyone. I was originally thinking of writing a bash or bat script that would set the PYTHONPATH and other environment variables before running the specific application code. It seemed to be the most simplest solution. There are no other applications that rely on the

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Kent Johnson
On Wed, Aug 19, 2009 at 4:00 PM, Jramak wrote: >> One more - put required packages and modules into the same directory >> as the executable, usually the current directory is on the Python >> search path. >> >> Kent > > > Hi Kent, there is no executable. It is just a collection of python scripts. >

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Kent Johnson
On Wed, Aug 19, 2009 at 3:56 PM, Jramak wrote: >> >> >> Don't edit site.py, it is part of the std lib. If you do want to >> customize it, add a site-customize.py in your site-packages folder and >> put your customizations there. > > There is no site-customize.py in Python25, how does Python know th

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Jramak
> > >> >> Don't edit site.py, it is part of the std lib. If you do want to >> customize it, add a site-customize.py in your site-packages folder and >> put your customizations there. > > > >> There is no site-customize.py in Python25, how does Python know that > site-customize.py needs to be loade

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Jramak
> > > > > Don't edit site.py, it is part of the std lib. If you do want to > customize it, add a site-customize.py in your site-packages folder and > put your customizations there. > > Kent > There is no site-customize.py in Python25, how does Python know that site-customize.py needs to be loaded

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Jramak
> > > One more - put required packages and modules into the same directory > as the executable, usually the current directory is on the Python > search path. > > Kent > Hi Kent, there is no executable. It is just a collection of python scripts. I assume you refer to the Python search path as PYTHO

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Kent Johnson
On Tue, Aug 18, 2009 at 7:57 PM, Jramak wrote: > Hello > We have developed three custom applications in Python. Each one of > these applications needs a different PYTHONPATH, in addition to > different environment variables to work. Instead of manually setting > the environment variables for each a

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Kent Johnson
On Tue, Aug 18, 2009 at 9:21 PM, Douglas Philips wrote: > I think you have five-ish general options: One more - put required packages and modules into the same directory as the executable, usually the current directory is on the Python search path. Kent __

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-19 Thread Alan Gauld
"Jramak" wrote We have developed three custom applications in Python. Each one of these applications needs a different PYTHONPATH, in addition to different environment variables to work. Environment variables should control the users (or oprocess) environment and as such should really be fai

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-18 Thread Douglas Philips
On 2009 Aug 18, at 7:57 PM, Jramak wrote: Hello We have developed three custom applications in Python. Each one of these applications needs a different PYTHONPATH, in addition to different environment variables to work. Instead of manually setting the environment variables for each application, w

Re: [Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-18 Thread Kent Johnson
On Tue, Aug 18, 2009 at 7:57 PM, Jramak wrote: > Hello > We have developed three custom applications in Python. Each one of > these applications needs a different PYTHONPATH, in addition to > different environment variables to work. Instead of manually setting > the environment variables for each a

[Tutor] Setting PYTHONPATH and other env vars dynamically

2009-08-18 Thread Jramak
Hello We have developed three custom applications in Python. Each one of these applications needs a different PYTHONPATH, in addition to different environment variables to work. Instead of manually setting the environment variables for each application, what would be the best way to set PYTHONPATH