Martin v. Löwis <mar...@v.loewis.de> added the comment:

> There are two issues here:

There are two issues, but not here :-)

> 1. socket.gethostname() shouldn't raise an error on Windows, but
>    return the Unicode host name

This is issue 9377, please keep that out of this issue.

> Could someone please check whether using the environment
> variable COMPUTERNAME would work in the described case ?

No - I didn't personally encounter the problem.

> What we could do is use the socket.gethostname() and fall back
> to COMPUTERNAME in case of decoding problems.

I think using socket.gethostname() is conceptually wrong: the
what uname returns is *not* the name the machine has in DNS,
but what is configured in the kernel.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10097>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to