[categories] [index] [all (553)] [latest]
#!/usr/bin/python import socket from urllib import urlopen socket.setdefaulttimeout(2) # secondes try: print urlopen("http://checkip.dyndns.org").readlines() except IOError: print "timeout"