Set an environment variable

Grant Edwards grante at
Fri Oct 21 16:34:09 CEST 2005

On 2005-10-21, Christian <christian at spam.not> wrote:
>> The closest thing you can do is that:
>> print 'export MY_VARIABLE=value'
>> --------------------------------------------------
>> python > /tmp/
>> . /tmp/
>> --------------------------------------------------

Bullshit.  Are people being intentionally misleading??

> Can I write a .py script that calls a .sh script that executes the 
> export command and then calls another .py script (and how would the 
> first .py script look)?

Good grief, that's ugly.  Just use os.putenv().

> That would be much more what is my basic problem.

And even Google knows the correct answer

Follow the first hit.

Grant Edwards                   grante             Yow!  TONY RANDALL! Is YOUR
                                  at               life a PATIO of FUN??

More information about the Python-list mailing list