title: ssh with winpexpect
body: <p>I've been trying to run this command to ssh from a .py on a Windows platform:</p>
  
  <pre><code>child = winpexpect.spawn('ssh %s@%s' % ('myID','m.y.i.p'))
  </code></pre>
  
  <p>It should function similarly to pexpect, but I receive this error:</p>
  
  <pre><code>pexpect.ExceptionPexpect: The command was not found or was not executable: ssh.
  </code></pre>
  
  <p>I've confirmed that C:\rhcygwin\bin is in my Path. Any suggestions on how to instruct the .py file to locate the ssh command?</p>
  
  <p>edit: I switched my approach: ran this code in my .py</p>
  
  <pre><code>    command = ['bash', '-c', './myssh.sh']
      proc = subprocess.Popen(command, stdout = subprocess.PIPE)
  </code></pre>
  
  <p>it's very rudimentary but it will connect successfully.</p>