Skip to content

Instantly share code, notes, and snippets.

@mygeekdaddy
Created April 8, 2014 17:45
Show Gist options
  • 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