In wxpython, is it better to handle events by creating a separate function for each event handler (say a separate function for every single button click) or to create one large button_handler, and then determine the button clicked from there?
Basically, I am wondering if it is more resource intensive to have many different events being watched for each separate thing, or just one big event that will figure out which one was clicked when it was fired.
Resource intensity is not your issue here, but you would definitely want to use one big event loop for this. Due to the Global Interpreter Lock, many event handlers in python have annoying ways of dealing the event queue, and in some event handlers it may even be impossible to check the event without removing it from the stack (VPython for example), and so in these cases you may well run into strange and hard to track errors if you use multiple checks within your code. If you use one large event this won't happen, or if it does, will be much easier to track down.
Ravenspoint is correct in that the resource intensity of either approach is trivial, and based on resource intensity alone you shouldn't worry about it, but a single event loop is significantly easier to maintain.
event handling in wxpython