to get external IP address

please use the script to get external IP of your target computer

from urllib2 import urlopen
myip = urlopen('http://ip.42.pl/raw').read()
print myip

sample output:

get public ip address.PNG