Actually, yes and possibly no. Because the interpreter is firing off a subprocess, the environment from mayapy manipulation is also most likely being stuffed into the chain (as you pointed out in #2).
Because we are asking the system to fire off a new interpreter, python will launch with the root system environment and not the one mushed by Maya via subprocesses carrying over the env variables the current interpreter is using (at least it works for us "so far"). I did re-read the subprocess information and it does plainly state that subprocess will inherit the system vars from the calling process, not a fresh copy from the system: "If env is not None, it must be a mapping that defines the environment variables for the new process; these are used instead of inheriting the current process’ environment, which is the default behavior." About 25% down the page: http://docs.python.org/library/subprocess.html HTH On Jan 22, 6:34 pm, Judah Baron <[email protected]> wrote: > That's effectively the same thing as using subprocess, and the same issue > will persist. > > > > On Sat, Jan 22, 2011 at 6:12 PM, Amorano <[email protected]> wrote: > > Windows? > > > If you dont need to run "inside" of Maya per se, i.e. run the script, > > not hang Maya in the meantime, return later with information, an: > > > import os > > os.system('start c:\python25\python.exe "%s" .....') > > > HTH. > > > On Jan 22, 7:04 am, Geoff Harvey <[email protected]> wrote: > > > Hello! > > > > Long time listener, first time caller. > > > > I've run into a situation where I need to launch gather some data from > > > a python script. > > > > The script I need to run happens to be long, complicated, and requires > > > python2.5. > > > > Thing is, when I launch it via subprocess from a python script inside > > > of Maya, I get a bunch of incompatibility errors, starting with the > > > inability to import the os module. > > > > Running the same scenario outside of Maya (ie, launching the python2.5 > > > script inside a python2.6 shell) works just swell. > > > > Any ideas on how to do this? > > > > Thanks in advance! > > > -- > >http://groups.google.com/group/python_inside_maya- Hide quoted text - > > - Show quoted text - -- http://groups.google.com/group/python_inside_maya
