title: How to see the output in pexpect?
body: <p>I have write this program:</p>
  
  <pre><code>[mik@mikypc ~]$ cat ftp.py 
   #!/usr/bin/env python
  
   # This connects to the rediris ftp site
   # 
   import pexpect
   child = pexpect.spawn('ftp ftp.rediris.es')
  
   child.expect('Name .*: ')
   child.sendline('anonymous')
   child.expect('ftp&gt; ')
   child.sendline('noah@example.com')
   child.expect('ftp&gt; ')
   child.sendline('lcd /tmp')
   child.expect('ftp&gt; ')
   child.sendline('pwd')
   child.expect('ftp&gt; ')
   child.sendline('bye')
  
  [mik@mikypc ~]$ ./ftp.py 
  [mik@mikypc ~]$ 
  [mik@mikypc ~]$ 
  [mik@mikypc ~]$ 
  </code></pre>
  
  <p>But I cannot see the output. How could I see it?. I don't see anything when I execute it. How could I see the output?.</p>