genau das ist der Effekt. Timeout und dann die Meldung "Could not connect. Please check host, check port and ensure that Brick Daemon is running."   
Hab dein Testskript laufen lassen, auch kein Erfolg: 
Traceback (most recent call last): 
  File "test.py", line 3, in <module> 
    s.connect(('localhost', 4223)) 
  File "/usr/lib/python2.7/socket.py", line 224, in meth 
    return getattr(self._sock,name)(*args) 
socket.error: [Errno 110] Connection timed out   
Ich versteh's auch nicht so ganz. 
brickd läuft: 
pi@raspberrypi ~ $ ps -eaf | grep brick 
root      3365     1  0 20:37 ?        00:00:00 /usr/bin/brickd --daemon   
hosts-Datei passt eigentlich auch: 
pi@raspberrypi /etc $ more hosts 
127.0.0.1	localhost