I know what when I use signals there are two arguments (signum and frame).
But what if I want to send more? For example: object for self.
How can I do it?
example:
def terminate_handler(signum, frame, self):
self.close()
signal.signal(signal.SIGINT, terminate_handler, object)
EDIT: I found out the solution I worte on the fly, when I thought it would not work, actualy work. I had no Idea it will work
def terminate_handler(self, signum, frame):
self.close()
signal.signal(signal.SIGINT, terminate_handler, object)