This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients lemburg, loewis
Date 2010-10-14.08:53:24
SpamBayes Score 1.8153719e-06
Marked as misclassified No
Message-id <4CB6C502.3090202@egenix.com>
In-reply-to <4CB6C181.6070109@egenix.com>
Content
Marc-Andre Lemburg wrote:
> 2. COMPUTERNAME returns an uppercase version of the host name (which we
>    could lowercase to stay b/w compatible), however I'm not sure
>    whether this is the same as the socket.gethostname() or the
>    NETBIOS name and I'm also not sure whether this is always set.
> 
>    This link suggests that it's using the NetBIOS name:
>    http://www.scriptlogic.com/support/CustomScripts/environmentVariableReference.html
> 
>    The official Microsoft page is unclear about this:
>    http://technet.microsoft.com/en-gb/library/bb490954.aspx

More evidence that the NetBIOS name is used:

http://msdn.microsoft.com/en-us/library/aa368009(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms724295(v=VS.85).aspx

One problem with this approach is that changes to the NetBIOS name
are not seen by those APIs and variables, e.g. if the machine
get's an update via DHCP. The other is that NetBIOS itself is
being phased out in favor of DNS names - which socket.gethostname()
returns, so we'd be replacing a new technology with an old one.

http://blogs.technet.com/b/networking/archive/2008/12/16/netbios-browsing-and-windows-server-2008-x64-server-core.aspx

BTW: Why doesn't socket.gethostname() use GetComputerNameEx()
which does support Unicode ?

See http://msdn.microsoft.com/en-us/library/ms724301(v=VS.85).aspx
History
Date User Action Args
2010-10-14 08:53:26lemburgsetrecipients: + lemburg, loewis
2010-10-14 08:53:24lemburglinkissue10097 messages
2010-10-14 08:53:24lemburgcreate