Re: getting env variable from bourne shell script

2004-12-21 Thread Fredrik Lundh
Thomas Guettler wrote: > you could use '^(.*?)=(.*)$' as regex to parse each line > group(1) is the variable name group(2) the value. may I recommend: key, value = line.split("=", 1) -- http://mail.python.org/mailman/listinfo/python-list

Re: getting env variable from bourne shell script

2004-12-21 Thread Thomas Guettler
Am Tue, 21 Dec 2004 07:51:53 -0800 schrieb biner: > Hello, > > I have file called PARAMETRES that is used in bourne shell script to > define variable. In order to do so I put a ". PARAMETRES" line and the > script has acces to all the variable defined in the PARAMETRES file. Hi, you can run "

getting env variable from bourne shell script

2004-12-21 Thread biner
Hello, I have file called PARAMETRES that is used in bourne shell script to define variable. In order to do so I put a ". PARAMETRES" line and the script has acces to all the variable defined in the PARAMETRES file. Now, I would like to be able to get the same thing in python. I googled and p