Tkinter code (with pmw) executing to soon please help

Scott David Daniels scott.daniels at acm.org
Sat Jan 13 23:55:48 EST 2007


Gabriel Genellina wrote:
>... So `callback` should return a function, like this:
> 
> def callback(text):
>   def handler(event):
>     print text
> 

Even better than that:
     def callback(text):
         def handler(event):
             print text
         return handler

Otherwise callback returns the spectacularly un-useful value None.

--Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list