Set an environment variable

Christian christian at spam.not
Fri Oct 21 13:29:18 CEST 2005

Steve Holden wrote:

> ::::::::::::::
> ::::::::::::::
> import os
> os.environ['STEVE'] = "You are the man"
> os.system("python")
> print "Ran one"
> ::::::::::::::
> ::::::::::::::
> import os
> print "STEVE is", os.environ['STEVE']
> print "Ran two"
> [sholden at headrat tmp]$ python
> STEVE is You are the man
> Ran two
> Ran one
> [sholden at headrat tmp]$
> Hope this helps.
> regards
>  Steve

Thanks Steve, you're quite right, you are the man. And thanks to all the 
rest of you for your kind help and patient understanding. I have learned 
quite a lot and is about to consider my self advanced to the status of 
Python newbie.

So here is my final question:
Do I call the .sh script with a .py script like this:


More information about the Python-list mailing list