title: Python telnetlib read's only print "bs"
body: <p>I'm trying to do some telnet automation with Python (only <em>pure</em> Python).  When I try to print some of my read's in the function <code>read_until</code>, all I see are a series of <code>bs</code>'s -- that's <code>bs</code>, as in the <code>backspace</code> character, not something else.  :-)</p>
  
  <p>Does anyone know if there's some kind of setting I can change in the on <code>tn</code>, my instance of the <code>Telnet</code> class, or correct this? Or is this something that my host is spewing back? I've done some Googling on the <code>telnetlib</code> library, and I haven't seen many examples where folks have output from the <code>Telnet.read_until</code> function.</p>
  
  <p>This is a cut-down version of my code: </p>
  
  <pre><code>import getpass
  import sys
  import telnetlib
  
  HOST = "blahblah"
  
  def writeline(data):
      local.write(data + '\n')
  
  def read_until(tn, cue, timeout=2):
      print 'Before read until "%s"' % cue
      print tn.read_until(cue, timeout)
      print 'After read until "%s"' % cue
  
  def tn_write(tn, text, msg=''):
      if not msg:
          msg = text
      print 'Before writing "%s"' % msg
      tn.write(text)
      print 'After writing "%s"' % msg    
  
  
  user = 'me'
  password = getpass.getpass()
  
  tn = telnetlib.Telnet(HOST)
  
  read_until(tn, "Username: ")
  tn_write(tn, user + "\n", user)
  
  if password:
      read_until(tn, "Password: ")
      tn_write(tn, password + "\n", 'password')
  
  read_until(tn, "continue")
  tn_write(tn, "\n", '&lt;Enter&gt;')
  
  #tn.write("vt100\n")
  
  tn_write(tn, 'main_menu' + '\n', 'start menu')
  read_until(tn, 'Selection: ')
  </code></pre>
  
  <p>I don't think it matters, but I'm using Python 2.7 on Windows.</p>