Message297499
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. |
|
Date |
User |
Action |
Args |
2017-07-01 23:44:27 | r.david.murray | set | recipients:
+ r.david.murray, docs@python, jamesdlin |
2017-07-01 23:44:27 | r.david.murray | set | messageid: <1498952667.77.0.193311813661.issue30798@psf.upfronthosting.co.za> |
2017-07-01 23:44:27 | r.david.murray | link | issue30798 messages |
2017-07-01 23:44:27 | r.david.murray | create | |
|