title: Send commands to a socket with Python
body: <p>I am trying to connect to a socket file and send it some commands :</p>
  
  <pre><code>#!/usr/bin/env python
  
  import socket
  
  s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
  s.connect("/var/run/socket")
  s.send('a command here')
  data = s.recv(1024)
  s.close()
  print 'Received', repr(data)
  </code></pre>
  
  <p>Did I miss something ? </p>
  
  <p>I am totally new with Python.</p>
  
  <p>Thanks in advance for any help !</p>