Machine Name

Steve Holden steve at holdenweb.com
Tue Aug 23 20:05:01 EDT 2005


Harlin Seritt wrote:
> How does one get the machine name with Python that the actual script is
> running on? Obviously, one could parse the hosts file but I was
> wondering if there was a quick way to get it done?
> 
> thanks,
> 
> Harlin Seritt
> 
  >>> from socket import gethostname
  >>> gethostname()
'bigboy'
  >>>

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/




More information about the Python-list mailing list