create python process
Trent Mick
trentm at ActiveState.com
Tue Apr 26 12:00:44 EDT 2005
[ajikoe at gmail.com wrote]
> I use windows and os.fork is not working in windows.
> Can we create process inside python I mean I have function and I want
> to run it as a process not a thread ?
>
> Should I run code from os. in order to run a processes?
Check out any or all of:
subprocess (new module in Python 2.4)
os.system
os.popen, os.popen2, os.popen3, os.popen4
Note that you can't just run a Python *function* in a separate process
directly. You'll have to have some way to call:
python.exe your_script.py
such that your function gets called.
Cheers,
Trent
--
Trent Mick
TrentM at ActiveState.com
More information about the Python-list
mailing list