'Return output of all subscribers for the given channel.'

def publish(self, channel, *args, **kwargs):

    if (channel not in self.listeners):
        return []
    exc = ChannelFailures()
    output = []
    items = [(self._priorities[(channel, listener)], listener) for listener in self.listeners[channel]]
    try:
        items.sort(key=(lambda item: item[0]))
    except TypeError:
        items.sort()
    for (priority, listener) in items:
        try:
            output.append(listener(*args, **kwargs))
        except KeyboardInterrupt:
            raise
        except SystemExit:
            e = sys.exc_info()[1]
            if (exc and (e.code == 0)):
                e.code = 1
            raise
        except:
            exc.handle_exception()
            if (channel == 'log'):
                pass
            else:
                self.log(('Error    in    %r    listener    %r' % (channel, listener)), level=40, traceback=True)
    if exc:
        raise exc
    return output
