another with execlp

Sylvain Thenault syt at pegasus.logilab.fr
Tue Sep 11 13:36:02 EDT 2001


here is my problem:

I want to fork a process an exec python inside
I have tried

if os.fork() == 0:
    os.execlp('python', 'myfile.py', 'myoption1', 'myoption2', 'myoption2value')
else:
    os.wait()

but i obtain

Unknown option: --

from the python interpreter (and not from myfile.py)

anybody have an idea?

TIA                
-- 
Sylvain Thenault

LOGILAB




More information about the Python-list mailing list