Message297244
Even though http://bugs.python.org/issue4057 was rejected (which I think is fair), I think it would be worth mentioning something about PWD in the Python docs for subprocess.Popen's cwd parameter (and possibly for os.chdir):
1. It's pretty common for people to use Python to execute other things.
2. I don't think it's that uncommon to come across binaries/scripts that directly read PWD instead of calling getcwd() or equivalent.
3. For people who encounter this problem for the first time, it can be really puzzling.
My suggestion would be to add something like:
Note: Some programs might expect that the current directory is specified in a PWD environment variable. Callers should explicitly set it themselves when invoking such programs.
or even just:
Note: Callers are responsible for setting a PWD environment variable if necessary. |
|
Date |
User |
Action |
Args |
2017-06-29 02:32:34 | jamesdlin | set | recipients:
+ jamesdlin, docs@python |
2017-06-29 02:32:34 | jamesdlin | set | messageid: <1498703554.38.0.302571639781.issue30798@psf.upfronthosting.co.za> |
2017-06-29 02:32:34 | jamesdlin | link | issue30798 messages |
2017-06-29 02:32:32 | jamesdlin | create | |
|