R. David Murray added the comment: If you pass shell=True, PWD gests set, because it is a shell variable and the shell sets it. If you don't, it doesn't, just like all the other shell-maintained variables. I'm not sure it is worth calling out specifically in the Popen docs, myself; it is one consequence among *many* of calling a program directly rather than through a shell. (Note that if a shell is involved at any point, PWD gets set, so it is only binary programs that require that they be called from a shell that are at issue.)
Furthermore, it is not obvious that even all shells set PWD, although I believe that most do. ---------- nosy: +r.david.murray _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30798> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com