Logo Search packages:      
Sourcecode: suds version File versions  Download package

def suds::client::PortSelector::__find (   self,
  name 
) [private]

Find a I{port} by name (string) or index (integer).
@param name: The name (or index) of a port.
@type name: (int|str)
@return: A L{MethodSelector} for the found port.
@rtype: L{MethodSelector}. 

Definition at line 419 of file client.py.

00419                           :
        """
        Find a I{port} by name (string) or index (integer).
        @param name: The name (or index) of a port.
        @type name: (int|str)
        @return: A L{MethodSelector} for the found port.
        @rtype: L{MethodSelector}. 
        """
        port = None
        if not len(self.__ports):
            raise Exception, 'No ports defined: %s' % self.__qn
        if isinstance(name, int):
            qn = '%s[%d]' % (self.__qn, name)
            try:
                port = self.__ports[name]
            except IndexError:
                raise PortNotFound, qn
        else:
            qn = '.'.join((self.__qn, name))
            for p in self.__ports:
                if name == p.name:
                    port = p
                    break
        if port is None:
            raise PortNotFound, qn
        qn = '.'.join((self.__qn, port.name))
        return MethodSelector(self.__client, port.methods, qn)
    
    def __dp(self):


Generated by  Doxygen 1.6.0   Back to index