title: Python Telnet Port 23 vs 223 with Different Results
body: <p>When I run this Python 3.1 code to access a device using telnetlib, it works as expected:</p>
  
  <pre><code>import telnetlib
  
  tn = telnetlib.Telnet("15.39.100.126", "23")
  tn.write(b"menu\n")
  tn.write(b"0\n")
  print(tn.read_all().decode('ascii'))
  </code></pre>
  
  <p>Then, I run this code (very similar to above, but this port presents different menus) to port 223 and get nothing:</p>
  
  <pre><code>import telnetlib
  
  tn = telnetlib.Telnet("15.39.100.126", "223")
  tn.write(b"ipconfig\n")
  tn.write(b"exit\n")
  print(tn.read_all().decode('ascii'))
  </code></pre>
  
  <p>When running the telnet session to 223 manually, it reports this:</p>
  
  <pre><code>WinCEPocket CMD v 6.00
  \&gt; 
  </code></pre>
  
  <p>Has anyone ever run into something like this with different telnet behavior with Python on the same device but different ports, or does anyone know what special approach I need to take with WinCE Pocket? Port 23 does NOT use WinCE Pocket - only port 223 does. Both telnet programs run equally well from the same windows command shell.</p>