create python process

A

ajikoe

Hello,

I would like to create python processes instead of thread.
Can anyone give me an example or site which shows a tutorial about how
to create processes ?

Sincerely Yours,
Pujo
 
A

ajikoe

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?

Sincerely Yours,
pujo
 
T

Trent Mick

[[email protected] 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top