A question about event handlers with wxPython

Erik Lind elind at spamcop.net
Tue Jan 15 10:04:21 EST 2008


> def HandleSomething(self, event):
>    generating_control = event.GetEventObject()
>    print generating_control
>
> HTH,

Thank you.That is what I was looking for, but as often seems the case, one 
thing exposes another. Is there any way to listen for events without 
specifically binding to a handler (it seems one cannot bind an event to two 
handlers?)? One could do so with globals, but I'm trying to avoid that.

For example, "press any button to stop"


def HandleSomething(self, event):
    .................
     while generating_control: == something:
            run
            else
            stop





More information about the Python-list mailing list