#NEWLINE# def get_pythread( ) : #NEWLINE# #INDENT# "\n    Loads the 'thread' module, free of monkey patching.\n    " #NEWLINE# global _pythread #NEWLINE# if _pythread : #NEWLINE# #INDENT# return _pythread #NEWLINE# #UNINDENT# import imp #NEWLINE# ( fp , path , desc ) = imp . find_module ( 'thread' ) #NEWLINE# try : #NEWLINE# #INDENT# _pythread = imp . load_module ( 'pythread' , fp , fp , desc ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# if fp : #NEWLINE# #INDENT# fp . close ( ) #NEWLINE# #UNINDENT# #UNINDENT# return _pythread