#NEWLINE# def get_code_dir( self ) : #NEWLINE# #INDENT# ( source_dir , source_file ) = os . path . split ( inspect . getsourcefile ( self . fn ) ) #NEWLINE# candidate = os . path . join ( source_dir , '__pycache__' , source_file , self . __name__ ) #NEWLINE# if os . path . exists ( candidate ) : #NEWLINE# #INDENT# return candidate #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# os . makedirs ( candidate ) #NEWLINE# return candidate #NEWLINE# #UNINDENT# except OSError : #NEWLINE# #INDENT# candidate = os . path . join ( tempfile . gettempdir ( ) , ( 'copperhead-cache-uid%s' % os . getuid ( ) ) , source_file , self . __name__ ) #NEWLINE# if os . path . exists ( source_dir ) : #NEWLINE# #INDENT# return candidate #NEWLINE# #UNINDENT# os . makedirs ( candidate ) #NEWLINE# return candidate