title: How to print/display the output of a telnet session in terminal window (Python)
body: <p>Can someone help to understand how print in the terminal window works?
  Here is a test script </p>
  
  <p>test_script.py</p>
  
  <pre><code>import telnetlib
  HOST = "10.1.1.151"
  tn = telnetlib.Telnet(HOST)
  tn.open(HOST)
  test_var = ["test"]
  print test_var
  tn_read =  tn.read_very_eager()
  print tn_read
  </code></pre>
  
  <p>Output when script is run from terminal:</p>
  
  <pre><code>$ python test_script.py
    ['test']
  </code></pre>
  
  <p><code>tn_read</code> should be something like "User Name : " but it is not printed in the terminal window.</p>
  
  <p>If I run it from the interpreter I get what is expected:</p>
  
  <pre><code> &gt;&gt;&gt; tn.read_very_eager()
   '\n\rUser Name : '
  </code></pre>
  
  <p>Why or what needs to be done to have the following output when the script is called from the terminal ?</p>
  
  <pre><code> $ python test_script.py
    ['test']
    User Name :  
  </code></pre>