commit c3f90fc23787e53f8c2f2aafa9ac1d5880fb01ef Author: J. Fernando Sánchez Date: Wed Jul 25 19:24:48 2018 +0200 diff --git a/hostname.py b/hostname.py new file mode 100644 index 0000000..90428c9 --- /dev/null +++ b/hostname.py @@ -0,0 +1,6 @@ +try: + import urllib2 +except ImportError: + from urllib.request import urlopen +response = urlopen('http://v4.ifconfig.co/ip') +HOSTNAME = response.read()