[Tutor] after(), how do I use it?

michael scott jigenbakuda at yahoo.com
Tue Apr 26 02:36:38 CEST 2011


Hello, I asked for help in another location and it solved my problem, but the 
only problem is I don't fully understand the after function. Here is part of the 
code that was given to me.


    def print_label_slowly(self, message):
        '''Print a label one character at a time using the event loop'''
        t = self.label.cget("text")
        t += message[0]
        self.label.config(text=t)
        if len(message) > 1:
            self.after(500, self.print_label_slowly, message[1:])

I understand it, and the gist of how it works, but the self.after... I can not 
find any documentation on it (because after is such a common word), so can you 
guys tell me how it works. Is this a built in function (didn't see it on the 
built in function list)? Does it always take 3 arguements? Is this a user made 
function and I'm just overlooking where it was defined at? 


----
What is it about you... that intrigues me so?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110425/774d20c6/attachment.html>


More information about the Tutor mailing list