mevets
January 17th, 2008, 05:37 PM
I cannot seem to use Timers. I have been able to get them to work inside the shell, but not when I make a new .py file and make the timer inside a class. I suppose my problem is that when I go to make a Timer inside another class i made that isnt allowed.
It always tells me Timer is not defined when I run this:
import time
import threading
class MyClass:
t=Timer(10,whatever)
def whatever(self):
print "you got here!"
return
It always tells me Timer is not defined when I run this:
import time
import threading
class MyClass:
t=Timer(10,whatever)
def whatever(self):
print "you got here!"
return