title: Interact with executables over server in Python?
body: <p>I want to run an executable on a TCP server and take its input from socket connections interactively and send the output back to the client until the executable is terminated. I was trying it with piping through <strong>Popen</strong> class of <strong>subprocess</strong> but its not helping with interaction with executable ( its just take input only one time but i want the input to be taken all the time until program exits ).</p>
  
  <p>Suppose I send "1" input to the server then server must send the stdout corresponding to "1" input to client and then ask for next input and do it till the executable exits in continuation .</p>