Python - Killing more than one thread on Control+C
<p>What am I doing wrong ? </p>

<p>I simply need to kill both threads on Control+C.</p>

<pre><code>def cleanup_stop_thread():
    for thread in enumerate():
        if thread.isAlive():
            try:
                self._Thread__stop()
            except:
                print(str(thread.getName()) + ' could not be terminated')

if __name__ == '__main__':  
    try:
        threading.Thread(target = record).start()
        threading.Thread(target = ftp).start()
    except (KeyboardInterrupt, SystemExit):
        cleanup_stop_thread();
        sys.exit()
</code></pre>
