[Tutor] Callbacks in a python module

Sean 'Shaleh' Perry shalehperry@attbi.com
Tue, 14 May 2002 23:56:22 -0700 (PDT)


On 15-May-2002 Nate Custer wrote:
> Hey all,
> 
> I like using callbacks in my pygtk programs, is there any way a python
> module can do the same thing? Specificly I need a class in one module to
> call a fcn in a different module.
> 

A call back is simply a stored name for a function.

import foo

callback_store(action, foo.func)
callback_act(action)

what are you not understanding?