spawnv question

jurgen.defurne at philips.com jurgen.defurne at philips.com
Wed Feb 14 08:26:52 CET 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.

Jurgen




danielk at aracnet.com@SMTP at python.org on 13/02/2001 16:53:38
Sent by:	python-list-admin at python.org
To:	python-list at python.org@SMTP
cc:	 
Subject:	spawnv question
Classification:	

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

import os
args = ('http://www.python.org', 'http://www.python.org') # 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 = ('http://www.python.org',) # This doesn't work

Thanks,
Daniel Klein

--
http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list