Message95758
On 26 Nov, 2009, at 19:27, Geoffrey Bache wrote:
>
> Geoffrey Bache <gjb1002@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 person that has had to set PWD explicitly in
> a python program for this reason. Yes, it's really the fault of the
> people who maintain the script I'm calling, but I don't think setting
> PWD on POSIX could have any bad effects and should surely be easy to do?
Shouldn't the script set $PWD itself? AFAIK shells like bash will set $PWD regardless of whether they are running as an interactive shell or as a shellscript.
Reading os.environ['PWD'] in a Python script not a good example of whey the proposed functionality might be useful because there are a number of ways to change the current working directory without affecting os.environ. For example using os.chdir, or even an extensions that calls the chdir system call directly.
Ronald |
File name |
Uploaded |
smime.p7s
|
ronaldoussoren,
2009-11-27.07:23:00
|
|
Date |
User |
Action |
Args |
2009-11-27 07:23:04 | ronaldoussoren | set | recipients:
+ ronaldoussoren, tebeka, gjb1002 |
2009-11-27 07:23:02 | ronaldoussoren | link | issue4057 messages |
2009-11-27 07:23:01 | ronaldoussoren | create | |
|