I am trying to wrap gnugo in a python script.
I\'ve gone over the other questions in SO about wrapping CLI applications here and here and though they\'ve helped so
Your issue is that Popen.communicate closes the file after performing its reads and writes.
You will have to manually call proc.stdin.write(...) to send the process text and proc.stdout.read*() to read text:
proc.stdin.write(...)
proc.stdout.read*()
while True: proc.stdin.write(c) r = proc.stdout.readline()