Skip to content

Instantly share code, notes, and snippets.

@mygeekdaddy
Created April 8, 2014 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mygeekdaddy/10161878 to your computer and use it in GitHub Desktop.
Save mygeekdaddy/10161878 to your computer and use it in GitHub Desktop.
get_ipaddr
import socket
import console
console.clear()
fqdn = socket.getfqdn() + '.local'
ip_addr = socket.gethostbyname(fqdn)
print ip_addr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment