I have a wxPython gui and I want to programmatically generate an event.
I've tried a syntax like this:
e = wx.Event.__init__(grid, eventType=wx.EVT_LEFT_DOWN)
which results in:
TypeError: unbound method __init__() must be called with Event instance as first argument (got Grid instance instead)
or:
e = wx.CommandEvent(commandType=wx.EVT_BUTTON)
TypeError: in method 'new_CommandEvent', expected argument 1 of type 'wxEventType'
So question is simply, what is the exact, literal syntax that I need to use to create an event object? Or, can someone point me to a good resource for making sense of events? I don't know if I'm just missing something simple in my understanding. I haven't been able to find a direct answer to this question yet online. I checked out this question: Generate a custom CommandEvent in wxPython , but I don't want to make a custom event.
Thanks in advance!