Get IP address with Python

#!/usr/bin/env python2

import urllib2
pub_ip = urllib2.urlopen(“http://automation.whatismyip.com/n09230945.asp”).read()
print pub_ip

Advertisements
Get IP address with Python