Re: Timer runs only once.

2016-11-30 Thread vnthmanoharan
On Wednesday, 30 November 2016 20:36:15 UTC+5:30, siva gnanam wrote: > On Wednesday, November 30, 2016 at 8:11:49 PM UTC+5:30, vnthma...@gmail.com > wrote: > > from threading import Timer > > > > class TestTimer: > > def foo(self): > > print("hello world") > > self.startTimer

Re: Timer runs only once.

2016-11-30 Thread Ian Kelly
On Wed, Nov 30, 2016 at 8:06 AM, siva gnanam wrote: > On Wednesday, November 30, 2016 at 8:11:49 PM UTC+5:30, vnthma...@gmail.com > wrote: >> from threading import Timer >> >> class TestTimer: >> def foo(self): >> print("hello world") >> self.startTimer() >> >> def startTi

Re: Timer runs only once.

2016-11-30 Thread siva gnanam
On Wednesday, November 30, 2016 at 8:11:49 PM UTC+5:30, vnthma...@gmail.com wrote: > from threading import Timer > > class TestTimer: > def foo(self): > print("hello world") > self.startTimer() > > def startTimer(self): > self.t1 = Timer(5, self.foo) > sel

Re: Timer runs only once.

2016-11-30 Thread siva gnanam
On Wednesday, November 30, 2016 at 7:35:46 PM UTC+5:30, siva gnanam wrote: > The following program print hello world only once instead it has to print the > string for every 5 seconds. > > from threading import Timer; > > class TestTimer: > > def __init__(self): > se

Timer runs only once.

2016-11-30 Thread vnthmanoharan
from threading import Timer class TestTimer: def foo(self): print("hello world") self.startTimer() def startTimer(self): self.t1 = Timer(5, self.foo) self.t1.start() timer = TestTimer() timer.startTimer() -- https://mail.python.org/mailman/listinfo/python

Timer runs only once.

2016-11-30 Thread siva gnanam
The following program print hello world only once instead it has to print the string for every 5 seconds. from threading import Timer; class TestTimer: def __init__(self): self.t1 = Timer(5.0, self.foo); def startTimer(self): self.t1.start();