[Tutor] spawnve env path updates not getting passed

Isaac Isaac@compuserve.com
Wed, 13 Sep 2000 22:17:35 -0700


in python 1.5.2 on windows98, is there a problem with spawnve?

I'm passing a modified os.environ:

  os.environ['PATH']=os.environ['PATH']+";c:\\cps_prod\\bin"

retVal = os.spawnve( os.P_WAIT, "mybatchfile.bat", self.args, os.environ
)

the args DO contain as the first item the "mybatchfile.bat".

The path looks right when I display it, but when I pass it to the
os.spawnve, the programs in the directory I've added to the path aren't
found.  (The file mybatchfile.bat DOES run, but all programs it calls
that are in the "cps_prod\bin" directory are not found.

There are workarounds: I could put the directory in the path command in
autoexec.bat on every cpu that needs to run this.  I could make the
batch files cd to the directories.  Neither are preferred solutions:
Why isn't the path getting passed with the environment?

Thanks!

Best,
Isaac