blob: f46cac72a2f4266b90f4a83d314e4ec492edf3a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#! /usr/bin/python
# To change this template, choose Tools | Templates
# and open the template in the editor.
import urllib2
def internet_on():
try:
response=urllib2.urlopen('http://74.125.113.99',timeout=1)
return True
except urllib2.URLError as err: pass
return False
print internet_on()
|