[issue10097] platform.uname gives UnicodeError for non-ASCII computer names on Windows
report at bugs.python.org
Thu Oct 14 20:14:12 CEST 2010
Ned Deily <nad at acm.org> added the comment:
>It's incorrect to use DNS names when implementing platform.uname():
>on POSIX, uname() *also* does not return the DNS name. If you want
>some API to return the DNS name of the computer, you need a different
>function (e.g. socket.getfqdn()).
Even more importantly, the computer may have (and these days, usually has) more than one network interface and/or multiple IP addresses bound to a single interface. Each IP address usually has a unique DNS name, but not necessarily. In general, there can be no one-to-one mapping of platform name to DNS name.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list