subprocess.Popen(..., cwd=...) and Makefile $(PWD) don't play nice

Miki miki.tebeka at gmail.com
Mon Oct 13 17:58:52 CEST 2008


> The problem is, he is not printing the name of the current working
> directory; he is printing the value of the variable $PWD.  That is
> likely set from the environment by the shell he started the Python
> program from, but Python does *not* update to reflect changes to
> the working directory.
Should I see it as a bug? Should subprocess change this?

> Use '@pwd' instead of '@echo $(PWD)'.
I'm using '$(shell pwd)', just wondered why $PWD didn't work.

Thanks for the explanation.
--
Miki <miki.tebeka at gmail.com>
http://pythonwise.blogspot.com




More information about the Python-list mailing list