spawnv question

Dave Brueck dbrueck at edgix.com
Tue Feb 13 10:50:12 EST 2001


argv[0] is reserved for the program name.

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Daniel Klein
> Sent: Tuesday, February 13, 2001 8:32 AM
> To: python-list at python.org
> Subject: spawnv question
> 
> 
> 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