Hello.
When using threading module and Thread() class, SIGINT (Ctrl+C in console) could not be catched.
Why and what can I do?
Simple test program:
#!/usr/bin/env python
import threading
def test(suffix):
while True:
print "test", suffix
def main():
for i in (1, 2, 3, 4, 5):
threading.Thread(target=test, args=(i, )).start()
if __name__ == "__main__":
main()
Try hitting Ctrl-C - nothing happens.