def disambiguate_url(url, location=None):
    try:
        proto,ip,port = split_url(url)
    except AssertionError:
        # probably not tcp url; could be ipc, etc.
        return url
    
    ip = disambiguate_ip_address(ip,location)
    
    return "%s://%s:%s"%(proto,ip,port)
turn multi-ip interfaces '0.0.0.0' and '*' into connectable
dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/util.py/disambiguate_url