Lance lbrannma at
Sat Oct 19 22:21:21 CEST 2002

Thanks all for the advice.. but I'm still not getting the hostid to which I
refer. At work we use the Flexlm license manager. It requires users to send
us the hostid of their computer. For example, the computer on which I write
this has hostid 00d009b88fca and the hostname is the name of my computer
which is MYNEWBOX.

I'd like somehow to get the above mentioned hostid. I believe that it's cpu


"Will Stuyvesant" <hwlgw at> wrote in message
news:cb035744.0210191049.56dca2f8 at
> [Lance]
> > I'd like to retrieve a computer's hostid. Does anyone know how to do
> socket.gethostname()
> ''Return a string containing the hostname of the machine where the
> Python interpreter is currently executing. If you want to know the
> current machine's IP address, you may want to use
> gethostbyname(gethostname()). This operation assumes that there is a
> valid address-to-host mapping for the host, and the assumption does
> not always hold. Note: gethostname() doesn't always return the fully
> qualified domain name; use gethostbyaddr(gethostname()) ''
> From the Reference Manual in your Python distro.
> Works like a charm on Windows; I have NT and XP.  Linux sometimes has
> problems with that address-to-host mapping since linux is so hard to
> configure.
> '''
> The program said "Requires Windows 9x or better", so I installed
> Linux.
> '''

More information about the Python-list mailing list