Grant Edwards <[EMAIL PROTECTED]> writes:

> On 2005-10-21, Christian <[EMAIL PROTECTED]> wrote:
>>> 
>>> The closest thing you can do is that:
>>> 
>>> -myScript.py--------------------------------------
>>> print 'export MY_VARIABLE=value'
>>> --------------------------------------------------
>>> 
>>> -myScript.sh--------------------------------------
>>> python myScript.py > /tmp/chgvars.sh
>>> . /tmp/chgvars.sh
>>> --------------------------------------------------
>
> Bullshit.  Are people being intentionally misleading??

No. Are you being intentionally - never mind.

> And even Google knows the correct answer
>
> http://www.google.com/search?hl=en&lr=&q=python+set+environment+variable
>
> Follow the first hit.

The first hit is basically the solution presented above translated
from Unix to Windows: your python script writes the appropriate shell
commands into a file, then you get the command processor to process
that file. The Windows version carries this a step further by wrapping
it all up in a script to make it easy to run, but that's the only real
difference. Maybe the results order has changed since you looked?

Watch the recipe - I may add a Unix/sh solution.

      <mike

-- 
Mike Meyer <[EMAIL PROTECTED]>                  http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to