Stéphane Wirtel <steph...@wirtel.be> added the comment: It's normal, when you execute a command, there is a fork/exec, fork for the new process, and the exec will replace the memory of the previous process by the new process.
in os.system, you use ('export MYENVPATH=/usr/bin/gcc') but this variable only exists for the $SHELL process, once this one is finished, the variable is just destroyed. You have to pass all the env variables when you call your process, read the doc of subprocess.Popen, there is a env variable, you have to pass the value to this parameter https://docs.python.org/2.7/library/subprocess.html?highlight=subprocess#subprocess.Popen ---------- nosy: +matrixise stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32760> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com