title: Piping Cygwin into a Python program
body: <p>As a i'm new to the whole Piping thing and Python I had recently encountered a problem trying to pipe Cygwin's stdin &amp; stdout into a python program usin Python's subprocess moudle.
  for example I took a simple program:</p>
  
  <pre><code>cygwin = subprocess.Popen('PathToCygwin',shell=False,stdin=subprocess.PIPE,stdout=subprocess.PIPE)
  cygwin.stdin.write('ssh')
  </code></pre>
  
  <p>After that I'm getting this error:</p>
  
  <pre><code>cygwin.stdin.write('ssh')
  IOError: [Errno 22] Invalid argument
  </code></pre>
  
  <p>What am I doing wrong?</p>