popen / batchfile / environment variables
Joerg Woelke
dvass at felis.uni-freiburg.de
Thu Nov 21 01:24:12 EST 2002
Hi!
Guy wrote:
> try:
> EnvVarValue=os.environ[EnviromentVarName]
> except:
> os.environ[EnviromentVarName]=""
> EnvVarValue=os.environ[EnviromentVarName]
>
> if EnvVarValue != "":
> EnvVarValue=string.split(EnvVarValue,Separator)
> for Value in ValuesList:
> EnvVarValue.append(Value)
> for Value in EnvVarValue:
> TotalEnv = TotalEnv + Value + Separator
> os.environ[EnviromentVarName]=TotalEnv
> else:
> for Value in EnvVarValue:
> TotalEnv = TotalEnv + Value + Separator
> os.environ[EnviromentVarName]=TotalEnv
os.putenv()
HTH, J"o!
--
sigfault
More information about the Python-list
mailing list