[Tutor] Calling a Method with a Reserved Name

Kent Johnson kent37 at tds.net
Thu Oct 25 00:16:03 CEST 2007

Alex Ezell wrote:

>            # TODO figure out how to call this soap method with reserved name
>            self.call_response = self.soap.import(self.soap_auth,
> file_name, import_groups, soap_flags)

> I tried to replace the import() call with these two lines:
> importFunc = getattr(self.soap, 'import')
> self.call_response = self.soap.importFunc(self.soap_auth, file_name,
> import_groups, soap_flags)

this should be
self.call_response = importFunc(self.soap_auth, file_name,
import_groups, soap_flags)

importFunc *is* the function you want to call, it is not an attribute of 


More information about the Tutor mailing list