Re: Question about basic use of a timer object from timeit module to execute code every so often in a class
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: Question about basic use of a timer object from timeit module to execute code every so often in a class

From: Robert Kern <rkern@ucsd.edu>
Date: Fri Jul 15 2005 - 13:39:39 CEST

42zeros@gmail.com wrote:
> I would like a function to be executed every x often.
> I was just wondering how to pass the following code correctly. my
> object t just doesn't know what checkMail is. How can I tell it that
> checkMail is a member of the class MyApp?

Reread the documentation for timeit. It doesn't do what you think it does.

Look at wxTimer instead.

-- 
Robert Kern
rkern@ucsd.edu
"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter
Received on Thu Sep 29 16:57:53 2005