On 2007-05-10, johnny <[EMAIL PROTECTED]> wrote:
> Is it possible to call threads inside another thread (nested threads)?
No. It's not possible to call threads because they're not
callable objects. (I'm assuming you're talking about Thread
objects from the threading module.)
If you're asking if
Is it possible to call threads inside another thread (nested threads)?
The example above creates a thread to call a function "eat" every time
based on a specified interval.
Now for example, if I make the called function "eat" to spawn threads
to do the work in a queue and when all jobs are done, s
On May 7, 10:42 pm, Nick Vatamaniuc <[EMAIL PROTECTED]> wrote:
> On May 7, 10:07 pm, johnny <[EMAIL PROTECTED]> wrote:
>
> > Is there a way to call a function on a specified interval(seconds,
> > milliseconds) every time, like polling user defined method?
>
> > Thanks.
>
> Sure,
>
> >>> def baz():
johnny wrote:
> Is there a way to call a function on a specified interval(seconds,
> milliseconds) every time, like polling user defined method?
>
> Thanks.
>
A very literal interpretation of your question yields the following very
simple answer:
import time
while True:
time.sleep(some
On May 7, 10:07 pm, johnny <[EMAIL PROTECTED]> wrote:
> Is there a way to call a function on a specified interval(seconds,
> milliseconds) every time, like polling user defined method?
>
> Thanks.
Sure,
>>> def baz():
...: print "Baz!"
...:
>>> from threading import Timer
>>> timer=Ti
Is there a way to call a function on a specified interval(seconds,
milliseconds) every time, like polling user defined method?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list