Get name of the local machine
import sys, socket hostname = socket.gethostname() print "Host name:", hostname