[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-12-01 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I agree that this is not something that Popen should be doing. If you need the environment variable set, the correct thing to do is what you did: set it in the environment you pass to Popen. -- nosy: +r.david.murray priority: -

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-30 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I tried that and it didn't work, though not for this reason. I'm also trying to read the output from the subprocess via a pipe and that wasn't being collected for some reason. I didn't really track down why so far, if it makes or

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-30 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: `Popen` is the wrong place to implement this functionality. It may be reasonable to introduce a higher-level wrapper API which does this sort of thing. Consider that if `Popen` itself does it, though, then there is no way to launch a

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-27 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: You misunderstand: I am not reading $PWD. I need to call a C program as a subprocess, which is written by a third party and which determines its current working directory by reading $PWD. os.chdir will not have any effect on this

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: What if you pass shell=True to the subprocess call? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4057 ___

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-26 Thread Geoffrey Bache
Changes by Geoffrey Bache gjb1...@users.sourceforge.net: -- nosy: +gjb1002 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4057 ___ ___

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-26 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: In most shells $PWD is a magic variable that is maintained by the shell itself. IMHO python has no reason to mess with variables that happen to be defined by some shells. If subprocess were to set $PWD, os.setuid should set $UID, and

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-26 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I can see your point, though I think particularly in this case it's (unfortunately) fairly common that scripts on POSIX platforms read $PWD instead of finding the current working directory properly. I'm probably not the first

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-26 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: On 26 Nov, 2009, at 19:27, Geoffrey Bache wrote: Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I can see your point, though I think particularly in this case it's (unfortunately) fairly common that scripts on