python:实现检查互联网连接check Internet Connectivity
from sys import argv
try:
# For Python 3.0 and later
from urllib.error import URLError
from urllib.request import urlopen
except ImportError:
# Fall back to Python 2's urllib2
from
from sys import argv
try:
# For Python 3.0 and later
from urllib.error import URLError
from urllib.request import urlopen
except ImportError:
# Fall back to Python 2's urllib2
from