Waiting awhile

Grant Edwards ge at nowhere.none
Mon Aug 7 14:53:37 EDT 2000


In article <8mmvlh$ep6$1 at nnrp1.deja.com>, Mike Olson wrote:

>How do I make a function delay for a second or two?  

import time

time.sleep(2)  

will wait 2 seconds.

>self.after(100, self.function)
>
>but it just says that after is an attribute error.  Can anyone help me?

The after() method is only available for Tk objects (it's
actually a Tcl command, IIRC).

-- 
Grant Edwards                   grante             Yow!  My haircut is totally
                                  at               traditional!
                               visi.com            



More information about the Python-list mailing list