Bryant Huang wrote:

> Ah beautiful, thank you both, Robert and Mark, for your instant and
> helpful responses. I understand, so the basic idea is to keep a
> variable that is globally accessible and call an external function to
> increment that variable...

accessible for the callback function, that is.

see Mark's example for the right way to do it (using a object to hold
the state, and an object method as the callback -- the latter is known
as a "bound method", and holds a reference to both the data (self) and
the code).

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to