spawn or fork

Diez B. Roggisch deetsNOSPAM at web.de
Wed Dec 8 08:48:11 EST 2004


> Thanks, but can I call it using spawn?

No, but you can spawn a python interpreter that calls it. Like this:

spawnv(P_<whatever>, sys.executable, ['-c', 'import myfile; foo()'])

But I suggest you use fork - then you can call it in the interpreter itself.
-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list