I am writing a gui in tkinter and using a publish/subscribe module (pyPubSub) to inform different parts of the program of what is occurring if they're subscribed. So, I have two functions that I need to work together. From tkinter, I'm using:
after_idle(callback, *args)
to call the message sending within the mainloop. As you can see, it only accepts *args for the arguments to send to the callback. The callback I'm sending is from pyPubSub:
sendMessage(topic, **kwargs)
So, I end up with this:
root.after_idle(pub.sendMessage, ?)
My question is, how do I make args work with kwargs? I have to call after_idle with positional arguments to send with the callback, but the callback requires keyword arguments only.