def _fetch_file(url):
    logging.warn('Downloading %s' % url)
    for tries in range(4):
        try:
            return urlopen(url, timeout=5.0).read()
        except Exception as e:
            logging.warn('Error while fetching file: %s' % str(e))
    raise IOError('Unable to download %r. Perhaps there is a no internet '
                  'connection? If there is, please report this problem.' % url)
Fetches a file from the internet. Retry a few times before
dataset/ETHPy150Open zoofIO/flexx/flexx/util/getphosphor.py/_fetch_file