title: pexpect output not showing
body: <p>Our simple pexpect script has this:</p>
  
  <pre><code>import pexpect
  import sys
  
  test = pexpect.spawn('ftp www.today.com')
  test.logfile = sys.stdout
  test.expect('Name.*')
  </code></pre>
  
  <p>However, on the shell the script was invoked, there's no output shown.
  Instead it seems to hang but we could see the process ftp ... is spawned.</p>
  
  <p>How to have the output shown on the shell the script is invoked ?</p>
  
  <p>thanks</p>