Scripter47 wrote: > How do i get my ip address? > > in cmd.exe i just type "ipconfig" then it prints: > ... > IP-address . . . . . . . . . . . . . . . . . : 192.168.1.10 > ... > how can i do that in python?? >
If you want to get your external IP you can do:
import urllib
checkIP = urllib.urlopen("http://checkip.dyndns.org").read()
externalIP = checkIP.split()[-1].strip("</body></html>")
print externalIP
Hope this helps.
Adonis
--
http://mail.python.org/mailman/listinfo/python-list
