import threading def hello(): print "hello, world" t = threading.Timer(30.0, hello) t.start() # after 30 seconds, "hello, world" will be printed
--- Dfenestr8 <[EMAIL PROTECTED]> wrote: > Hi. > > Trying to set up a timer function for my irc bot, > which uses the python > irclib.py. > > If I use time.sleep(20), it tends to freeze up the > bot completely for 20 > secs. That's not what I want though! I want the > program to wait 20 secs, > then perform another function, but in the meantime > be able to accept other > commands. > > How do I do that? > -- > http://mail.python.org/mailman/listinfo/python-list > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ -- http://mail.python.org/mailman/listinfo/python-list