Author dabrahams
Recipients dabrahams, docs@python, mark, r.david.murray
Date 2010-04-30.02:47:55
SpamBayes Score 0.000592021
Marked as misclassified No
Message-id <1272595679.26.0.00752879784443.issue8557@psf.upfronthosting.co.za>
In-reply-to
Content
I wrote a Python script (enclosed) to methodically test how these things work, that doesn't rely on peculiarities of sys.executable.  The tests did reveal some notable differences on *nix and 'doze:

* When shell=False on windows you must launch the process using a full filename (e.g. "foo.exe", not just "foo", pass --invoke-filename to the script to enable that).  This may seem obvious to you, but for me it was surprising that one executable lookup function (looking in PATH) is in effect but not the other (extending unqualified executable names).  This should be spelled out in the docs.

* On *nix, with shell=False and the executable is neither in the PATH in the environment at the time of Python's launch nor in os.environ at the time of Popen, passing Popen an explicit env whose PATH includes the executable is enough to cause it to be found.  Not so on 'doze. 

* On 'doze, when the executable is in the PATH of os.environ but not in that of Popen's explicit env argument, even with shell=False, no Exception is raised (but returncode is nonzero)
History
Date User Action Args
2010-04-30 02:47:59dabrahamssetrecipients: + dabrahams, mark, r.david.murray, docs@python
2010-04-30 02:47:59dabrahamssetmessageid: <1272595679.26.0.00752879784443.issue8557@psf.upfronthosting.co.za>
2010-04-30 02:47:57dabrahamslinkissue8557 messages
2010-04-30 02:47:56dabrahamscreate