Getting name of windows computer running python script?
It turns out there are three options (including the two already answered earlier):
>>> import platform>>> import socket>>> import os>>> platform.node()'DARK-TOWER'>>> socket.gethostname()'DARK-TOWER'>>> os.environ['COMPUTERNAME']'DARK-TOWER'
From https://mail.python.org/pipermail/python-list/2006-April/397494.html
import osos.getenv('COMPUTERNAME')