title: Open interactive telnet session from Python
body: <p>I am currently writing a small script in Python which reads some possible connections from a database (triple of node name, telnet IP address and telnet port) and present that to the user to choose to which node to connect.</p>
  
  <p>After this selection I want to open an interactive Telnet session, which can be used by the user as if he had manually connected using the telnet command. Somehow I probably will need an escape sequence for that. It only needs to work on Linux OS.</p>
  
  <p>I could just call telnet:</p>
  
  <pre><code># Open shell
  call(["telnet", selected_node['ip'], selected_node['port']])
  </code></pre>
  
  <p>That does work. However, I wonder if there might be a better solution.</p>