#NEWLINE# def exec_module( self , module ) : #NEWLINE# #INDENT# moduleName = module . __name__ #NEWLINE# hashRoot = self . finder . hashRoot ( ) #NEWLINE# if moduleName . startswith ( hashRoot ) : #NEWLINE# #INDENT# moduleName = moduleName [ len ( hashRoot ) : ] #NEWLINE# #UNINDENT# if self . isModuleDir : #NEWLINE# #INDENT# name = ospath . join ( * tuple ( ( moduleName . split ( '.' ) + [ '__init__.py' ] ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( '.' in moduleName ) : #NEWLINE# #INDENT# name = ( ospath . join ( * tuple ( moduleName . split ( '.' ) ) ) + '.py' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name = ( moduleName + '.py' ) #NEWLINE# #UNINDENT# #UNINDENT# codeproc = ( lambda s : fix_imports ( s , name , hashRoot , self . finder . getZipTopLevelNames ( ) ) ) #NEWLINE# try : #NEWLINE# #INDENT# if ( sys . version_info >= ( 3 , 0 ) ) : #NEWLINE# #INDENT# converter = ( lambda s : codeproc ( ( s + b'\n' ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# converter = ( lambda s : codeproc ( ( s . replace ( '\r\n' , '\n' ) + '\n' ) ) ) #NEWLINE# #UNINDENT# code = self . finder . withZipElementSource ( name , converter ) #NEWLINE# do_exec ( code , module . __dict__ ) #NEWLINE# #UNINDENT# except Exception as ex : #NEWLINE# #INDENT# thesplog ( 'sourceload realization failure in %s: %s' , moduleName , ex , level = logging . ERROR ) #NEWLINE# raise