On 27/10/2011 20:53, Terry Reedy wrote:
On 10/27/2011 6:36 AM, Tim Golden wrote:
On 27/10/2011 11:27, Propad wrote:
the suggestion to add the optional second parameter fixed the problem,
spawnl now works on the Win 7 computer I'm responsible for (with
Python 2.2). So the suggested cause seems to be right.
FWIW, although it's not obvious, the args parameter to spawnl
is intended to become the sys.args (in Python terms) of the
newly-spawned process. Which is why the first element is expected
to be the name of the process. It took me some time to realise
this myself :)
Anyway, glad we could be of help.
Can we make this fix automatic for Win7 to fix #8036?
It's tempting, but I think not. In principle, the caller can
pass any value as the first arg of spawn: it'll simply end up
as sys.argv[0] in Python terms. If spawnl were the way of the
future, I'd be inclined to argue for the change. As it it, though,
I'd simply apply the patch and, possibly, add a line to the docs
indicating that the args must be non-empty.
(I started to import the patch yesterday but something got in the
way; I'll see if I can get it done today).
TJG
--
http://mail.python.org/mailman/listinfo/python-list