Author James Crowther
Recipients James Crowther, ned.deily, ronaldoussoren, ssbarnea
Date 2018-11-10.08:37:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi guys, I am the OP for the stack overflow issue question that sparked this bug report. 

In response to Ned's question about configuration of the system:

MacOS 10.14.1
Installed x-code and command line tools
python versions used, varies, 3.5.3, 3.6 and 3.7.0 (sorry can't be more specific about 3.6 since I've used a lot. These python configurations have been both a bundled python env in blender, and also MacOS's native python 2.7.

So far they've all had the same issue, that being;


returns a value that seems to be set by the router/switch if 

scutil --set hostname somehostname 

has not been run. What Sorin mentioned on the stack overflow question that he didn't here (and I feel is important) is that ping and nslookup work with the expected hostname, i.e. the one the user can actually see by going to the system preferences and viewing it under the sharing section. Here it is called "Computer name", analogous to the same used on windows (which I might add has no such issues with hostnames being set to something other than the computer name unless a certain command is run).

So the real issue for us, is how come ping and nslookup will work fine with the macOS "computer name" but the socket module uses something else, seemingly the hostname and computer name are not or loosely connected on macOS perhaps. 

Ideally what we need here is a way to ensure that the user can input the computer name of a target machine on another system and that system resolve the ip address for the target machine. We can't currently use socket.gethostname for this on mac since it seems to require that the scutil --set hostname command has been run. Otherwise the hostname that is returned doesn't work with socket.gethostbyname(hostname).

Hope this helps, happy to clarify.

Date User Action Args
2018-11-10 08:38:00James Crowthersetrecipients: + James Crowther, ronaldoussoren, ned.deily, ssbarnea
2018-11-10 08:38:00James Crowthersetmessageid: <>
2018-11-10 08:38:00James Crowtherlinkissue35164 messages
2018-11-10 08:37:59James Crowthercreate