Python threading module provides _Thread_stop() and _Thread_delete() to kill threads.
threading
_Thread_stop()
_Thread_delete()
>>> from threading import * >>> for thread in enumerate(): ... if (thread.isAlive()): ... thread._Thread_stop() ...