New submission from James Lin:

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.

----------
assignee: docs@python
components: Documentation
messages: 297244
nosy: docs@python, jamesdlin
priority: normal
severity: normal
status: open
title: Document that subprocess.Popen does not set PWD
type: enhancement
versions: Python 3.6

_______________________________________
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

Reply via email to