spawnv question

jurgen.defurne at jurgen.defurne at
Wed Feb 14 02:26:52 EST 2001

To know why, you should consult the MS documentation about the spawn calls.
Their standard is to use as first argument in the argumentlist the name of the program
that you called.

The Python documentation is very unclear about the spawn calls. What is not
mentioned also is that both spawnv(e) and spawnl(e) are available in Python 2.0.


danielk at at on 13/02/2001 16:53:38
Sent by:	python-list-admin at
To:	python-list at
Subject:	spawnv question

Here is a snippet of code I'm using with the 'spawnv' command:

import os
args = ('', '') # This works
os.spawnv(os.P_NOWAIT, 'c:\progra~1\intern~1\iexplore', args)
print "done"

The Python Reference for the 'spawnv' command says:

 "Execute the program path in a new process, passing the arguments specified in
args as command-line parameters. args may be a list or a tuple."

My question is, why do I have to specify the url argument twice in the 'args'
variable. It doesn't seem to work properly if I specify it as a 1-element
tuple, ie...

args = ('',) # This doesn't work

Daniel Klein


More information about the Python-list mailing list