Ned Deily added the comment:

James, I'm sorry I didn't show it but using socket.gethostname() as the source 
of hostname works just fine, too.

import socket
>>> hostname = socket.gethostname()
>>> hostname
'harj.local'
>>> socket.getaddrinfo(hostname, None)
[(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_DGRAM: 2>, 17, '', 
('fe80::8d8:1de3:dfa:e34c%en1', 0, 0, 5)), (<AddressFamily.AF_INET6: 30>, 
<SocketKind.SOCK_STREAM: 1>, 6, '', ('fe80::8d8:1de3:dfa:e34c%en1', 0, 0, 5)), 
(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('10.0.1.7', 
0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', 
('10.0.1.7', 0))]

I don't know what to tell you other than the behavior you are seeing is almost 
certainly not a Python issue.  There are many other ways to explore host names, 
like using the "host" command line utility or "netstat".  But that is all 
beyond the scope of this bug tracker.  If you need more assistance, perhaps ask 
on one of the StackExchange forums or Apple lists.  I'm going to close this 
issue; if you are able to isolate what appears to be a Python issue here, 
please feel free to re-open this.  Good luck!

----------
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

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

Reply via email to