Andrey Morozov added the comment:
it fix my problem:
e = os.environ.copy()
e['PATH_TO_MY_APPS'] = "path/to/my/apps"
p = subprocess.Popen(sys.executable + " test1.py 123", env=e, shell=True,
stdout=subprocess.PIPE)
answer: need have copy of environments
---
Andrey Morozov added the comment:
WIDW ?
--
Added file: http://bugs.python.org/file23839/test1.py
___
Python tracker
<http://bugs.python.org/issue13524>
___
___
New submission from Andrey Morozov :
run_me.py:
import subprocess, sys
e = {'PATH_TO_MY_APPS' : "path/to/my/apps"}
p = subprocess.Popen(sys.executable + " test1.py 123", env=e, shell=True,
stdout=subprocess.PIPE)
print(p.stdout.readlines())
p.wait()
test1.py