def get_pub_addresses(names=None, timeout=10, nameserver="localhost"):
    """Get the address of the publisher for a given list of publisher *names*
    from the nameserver on *nameserver* (localhost by default).
    """
    addrs = []
    if names is None:
        names = ["", ]
    for name in names:
        then = datetime.now() + timedelta(seconds=timeout)
        while datetime.now() < then:
            addrs += get_pub_address(name, nameserver=nameserver)
            if addrs:
                break
            time.sleep(.5)
    return addrs
Get the address of the publisher for a given list of publisher *names*
    from the nameserver on *nameserver* (localhost by default).