471,896 Members | 2,498 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,896 software developers and data experts.

Machine Name

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

Aug 23 '05 #1
1 2734
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/

Aug 24 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Michael | last post: by
5 posts views Thread by =?Utf-8?B?SmVycnkgQw==?= | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.