'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}.'

def __find(self, name):

    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)
