Can you feed your process:
env = os.environ
to get all the vars?
Something I do from maya.
subprocess.Popen(cmd, env = env)

On Jan 23, 10:20 pm, Leonid Onokhov <[email protected]> wrote:
> IIRC New process should inherit environment from parent process. As I
> understand it, built-in site-packages and libs don't need to be in
> PYTONPATH, it should be guessed from PYTHONHOME, or if not set - depend on
> interpreter compile time flags like --prefix.
> Strangely maya has PYTHONHOME in it's environment, but running
>
>  >import subprocess
>
> >x = subprocess.Popen(["python2.5", "-c",
> > "import os; print os.__file__; print 'PYTHONHOME' in os.environ"],
> > stdout=subprocess.PIPE, stderr=subprocess.PIPE)
> >s,e = x.communicate()
> >print s
> >print e
>
> is returning correct path to 2.5 os module and False for PYTHONHOME check.
> At least under linux.
>
> That is totally strange.
>
> I think you should check if you have PYTHONHOME set in your system
> environment.

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to