How to start a process?

David Lees DavidL at nonospamraqia.com
Mon Dec 11 22:59:26 CET 2000


I would like to start up a number of simultaneos processes from a Python
script.  Can someone explain or refer me to a document that explains
what is going on below.  As a test I am executing a script 'hack.py'. 
Why do I get this OSError when I try using execv, but it runs when I use
'execfile'?

Thanks in advance.

david lees


>>> execfile('hack.py')
foo to you charlie
more hacks
>>> os.execv('e:\python20\hack.py',['foo','bar'])
Traceback (innermost last):
File "<interactive input>", line 1, in ?
OSError: [Errno 8] Exec format error
>>>



More information about the Python-list mailing list