'Takes in either a class or an instance of a class.  If obj is a class
then this removes all instances of that class from all events.  If the
obj parameter is an instance then it removes only that instance from all
events it is registered for.  If obj is a sequence type then RemoveListener
will be recursively called with the contents of the list (do NOT pass
recursive sequences to this function or you will end up with an infinite
loop).'

def RemoveListener(self, obj):

    if operator.isSequenceType(obj):
        for x in obj:
            self.RemoveListener(x)
    else:
        for key in self.Listeners.Keys:
            self.RemoveListenerByInstance(key, obj)
            key = str(key)
            if hasattr(obj, key):
                if (issubclass(type(obj), type) or (type(obj) == ClassType)):
                    self.RemoveListenerByType(key, obj)
                else:
                    f = getattr(obj, key)
                    self.RemoveListenerByInstance(key, f)
