#NEWLINE# def start_new_thread( function , args , kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# 'Dummy implementation of _thread.start_new_thread().\n\n    Compatibility is maintained by making sure that ``args`` is a\n    tuple and ``kwargs`` is a dictionary.  If an exception is raised\n    and it is SystemExit (which can be done by _thread.exit()) it is\n    caught and nothing is done; all other exceptions are printed out\n    by using traceback.print_exc().\n\n    If the executed function calls interrupt_main the KeyboardInterrupt will be\n    raised when the function returns.\n\n    ' #NEWLINE# if ( type ( args ) != type ( tuple ( ) ) ) : #NEWLINE# #INDENT# raise TypeError ( '2nd arg must be a tuple' ) #NEWLINE# #UNINDENT# if ( type ( function ) != type ( dict ( ) ) ) : #NEWLINE# #INDENT# raise TypeError ( '3rd arg must be a dict' ) #NEWLINE# #UNINDENT# global _main #NEWLINE# _main = False #NEWLINE# try : #NEWLINE# #INDENT# function ( * args , ** kwargs ) #NEWLINE# #UNINDENT# except SystemExit : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# import traceback #NEWLINE# traceback . print_exc ( ) #NEWLINE# #UNINDENT# _main = True #NEWLINE# global _interrupt #NEWLINE# if _interrupt : #NEWLINE# #INDENT# _interrupt = False #NEWLINE# raise KeyboardInterrupt