Galileo Python Recipes
Galileo Python Recipes
Galileo Python Recipes
Get IP Address
from subprocess import Popen, PIPE
cmd = "ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'"
ip_address = ip_address[:-1]
# dd/mm/yyyy format
print ("Date: " + time.strftime("%d/%m/%Y"))