run function in background?
Piet van Oostrum
piet at cs.uu.nl
Fri Jun 8 15:39:28 EDT 2001
>>>>> Damian Menscher <menscher+python at uiuc.edu> (DM) writes:
DM> Is there a way to run a function in python in the background?
DM> Ideally I'd want something like
DM> def my_func(params):
DM> stuff here
DM> for i in range(10):
DM> print "starting a process"
DM> my_func(params) &
DM> where the & indicates that shouldn't stop the flow of the program,
DM> so the loop would continue and have all 10 go simultaneously.
Use threads.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl
More information about the Python-list
mailing list