default_api.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:mmtf-python 作者: rcsb 项目源码 文件源码
def _internet_on(address):
    """
    Check to see if the internet is on by pinging a set address.
    :param address: the IP or address to hit
    :return: a boolean - true if can be reached, false if not.
    """
    try:
        urllib2.urlopen(address, timeout=1)
        return True
    except urllib2.URLError as err:
        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号