I am trying to learn how to run a thread off the main GUI app to do my serial port sending/receiving while keeping my GUI alive. My best Googling attempts have landed me at the
That's the old style of defining custom events. See the migration guide for more information.
Taken from the migration guide:
If you create your own custom event types and EVT_* functions, and you want to be able to use them with the Bind method above then you should change your EVT_* to be an instance of
wx.PyEventBinder
instead of a function. For example, if you used to have something like this:myCustomEventType = wxNewEventType() def EVT_MY_CUSTOM_EVENT(win, id, func): win.Connect(id, -1, myCustomEventType, func)
Change it like so:
myCustomEventType = wx.NewEventType() EVT_MY_CUSTOM_EVENT = wx.PyEventBinder(myCustomEventType, 1)
Here is another post that I made with a couple of example programs that do exactly what you are looking for.