title: How to pipe python socket to a stdin/stdout
body: <p>I need to write an app to contact to a server. After sending a few messages it should allow the user to interact with the server by sending command and receive result.</p>
  
  <p>How should I pipe my current socket so that the user can interact with the server without the need of reading input and writing output from/to stdin/stdout ?</p>