Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

create python process

0 views
Skip to first unread message

aji...@gmail.com

unread,
Apr 26, 2005, 1:34:13 AM4/26/05
to
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

Mike Meyer

unread,
Apr 26, 2005, 3:55:39 AM4/26/05
to
"aji...@gmail.com" <aji...@gmail.com> writes:

> 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 ?

See the os.fork documentation.

<mike
--
Mike Meyer <m...@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

aji...@gmail.com

unread,
Apr 26, 2005, 4:36:30 AM4/26/05
to
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

Trent Mick

unread,
Apr 26, 2005, 12:00:44 PM4/26/05
to aji...@gmail.com, pytho...@python.org
[aji...@gmail.com wrote]

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
Tre...@ActiveState.com

0 new messages