title: OS-independent Inter-program communication between Python and C
body: <p>I have very little idea what I'm doing here, I've never done anything like this before, but a friend and I are writing competing chess programs and they need to be able to communicate to each other.</p>
  
  <p>He'll be writing mainly in C, the bulk of mine will be in Python, and I can see a few options:</p>
  
  <ul>
  <li>Alternately write to a temp file, or successive temp files. As the communication won't be in any way bulky this could work, but seems like an ugly work-around to me, the programs will have to keep checking for change/new files, it just seems ugly.</li>
  <li>Find some way of manipulating pipes i.e. mine.py| ./his . This seems like a bit of a dead end.</li>
  <li>Use sockets. But I don't know what I'd be doing, so could someone give me a pointer to some reading material? I'm not sure if there are OS-independent, language independent methods. Would there have to be some kind of supervisor server program to administrate?</li>
  <li>Use some kind of HTML protocol, which seems like overkill. I don't mind the programs having to run on the same machine.</li>
  </ul>
  
  <p>What do people recommend, and where can I start reading?</p>