def check_internet_on():
    try:
        urllib2.urlopen('http://74.125.228.100', timeout=1)
        return True

    except urllib2.URLError:
        pass

    return False
Utility method to check if we have an internet connection.
dataset/ETHPy150Open cpbotha/nvpy/nvpy/utils.py/check_internet_on