title: Python 2 process communicate on socket
body: <p>I need 2 processes to communicate. Either may run alone, but when they are running together they should be communicating. They only send a few bytes to each other every minute. Neither is thought of as "host" or "client".</p>
  
  <p>I tried to make a class which handles that in the background. For instance, it first tries to connect to the socket, if that fails it tries to listen, etc. When one program terminates the other takes over listening, etc. After struggling with this for too long I've given up. There are far too many bugs and I can't make it work reliably.</p>
  
  <p>So I am wondering if there is a good alternate solution, or if there is a robust implementation of this sort of thing I can use. I don't have time to fool around any more. I need it to work on windows and linux.</p>