#NEWLINE# def __init__( self , morf , file_locator ) : #NEWLINE# #INDENT# self . file_locator = file_locator #NEWLINE# if hasattr ( morf , '__file__' ) : #NEWLINE# #INDENT# f = self . __file__ #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# f = morf #NEWLINE# #UNINDENT# if ( f . endswith ( '.pyc' ) or f . endswith ( '.pyo' ) ) : #NEWLINE# #INDENT# f = f [ : ( - 1 ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if f . endswith ( '$py.class' ) : #NEWLINE# #INDENT# f = ( f [ : ( - 9 ) ] + '.py' ) #NEWLINE# #UNINDENT# #UNINDENT# self . filename = self . file_locator . canonical_filename ( f ) #NEWLINE# if hasattr ( morf , '__name__' ) : #NEWLINE# #INDENT# n = modname = morf . __name__ #NEWLINE# self . relative = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# n = os . path . splitext ( morf ) [ 0 ] #NEWLINE# rel = self . file_locator . relative_filename ( n ) #NEWLINE# if os . path . isabs ( n ) : #NEWLINE# #INDENT# self . relative = ( rel != n ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . relative = True #NEWLINE# #UNINDENT# n = rel #NEWLINE# modname = None #NEWLINE# #UNINDENT# self . name = n #NEWLINE# self . modname = modname