#NEWLINE# def __getattr__( self , name ) : #NEWLINE# #INDENT# 'Get a COM attribute.' #NEWLINE# if ( name . startswith ( '__' ) and name . endswith ( '__' ) ) : #NEWLINE# #INDENT# raise AttributeError ( name ) #NEWLINE# #UNINDENT# descr = self . __bind ( name , ( DISPATCH_METHOD | DISPATCH_PROPERTYGET ) ) #NEWLINE# if ( descr is None ) : #NEWLINE# #INDENT# raise AttributeError ( name ) #NEWLINE# #UNINDENT# if ( descr . invkind == DISPATCH_PROPERTYGET ) : #NEWLINE# #INDENT# if ( descr . funckind == FUNC_DISPATCH ) : #NEWLINE# #INDENT# if ( name . cParams == 0 ) : #NEWLINE# #INDENT# return self . _comobj . _invoke ( descr . memid , descr . invkind , 0 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( descr . funckind == FUNC_PUREVIRTUAL ) : #NEWLINE# #INDENT# if ( descr . cParams == 1 ) : #NEWLINE# #INDENT# return self . _comobj . _invoke ( descr . memid , descr . invkind , 0 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise RuntimeError ( ( 'funckind %d not yet implemented' % descr . funckind ) ) #NEWLINE# #UNINDENT# #UNINDENT# put = self . __bind ( name , DISPATCH_PROPERTYPUT ) #NEWLINE# putref = self . __bind ( name , DISPATCH_PROPERTYPUTREF ) #NEWLINE# return NamedProperty ( self , descr , put , putref ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# def caller( * args ) : #NEWLINE# #INDENT# return self . _comobj . _invoke ( descr . memid , descr . invkind , 0 , * args ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# caller . __name__ = name #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return caller