Re: How to get computer name

2006-04-29 Thread Richard Townsend
On 29 Apr 2006 10:04:39 -0700, pitarda wrote: > Thanks! :) > > Though,... I think once I saw something like: getComputerByName but > can't find it anymore,... > > :) >>> import socket >>> print socket.gethostname() blade >>> print socket.gethostbyname('blade') # will print IP address -- Rich

Re: How to get computer name

2006-04-29 Thread pitarda
Thanks! :) Though,... I think once I saw something like: getComputerByName but can't find it anymore,... :) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get computer name

2006-04-29 Thread Tim Heaney
"pitarda" <[EMAIL PROTECTED]> writes: > How do I get the computer name in python? You can use the os module to get it from your environment. >>> import os >>> os.getenv('HOSTNAME') 'calvin.watterson' Depending on your operating system, the environment variable you need might have a differ

How to get computer name

2006-04-29 Thread pitarda
How do I get the computer name in python? I've been looking over the internet, and couldn't find anything. Thanks! Bud -- http://mail.python.org/mailman/listinfo/python-list