Python: Pass more than two arguments in signal
<p>I know what when I use signals there are two arguments (signum and frame).</p>

<p>But what if I want to send more? For example: object for self.</p>

<p>How can I do it?</p>

<p>example:</p>

<pre><code>def terminate_handler(signum, frame, self):
    self.close()
signal.signal(signal.SIGINT, terminate_handler, object)
</code></pre>

<p>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</p>

<pre><code>def terminate_handler(self, signum, frame):
        self.close()
signal.signal(signal.SIGINT, terminate_handler, object)
</code></pre>