Hi everyone,

in my script (python 2.5 on windows xp) I need to run a simple
function in a separate process. In other words I need something
similar to the fork function under UNIX. I tried with threads:

import os, threading

def func(s) :
    print "I'm thread number "+s, os.getpid()

threading.Thread(target=func, args=("1",)).start()
threading.Thread(target=func, args=("2",)).start()

but this does not work, since the two threads share the same pid. Can
anyone give me a suggestion?
Thanks in advance.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to