quest about telnetlib

  • Thread starter =?gb2312?B?1cXWvsP3?=
  • Start date
?

=?gb2312?B?1cXWvsP3?=

code below cannt work

import getpass
import sys
import telnetlib
import select

tn = telnetlib.Telnet()

print tn.open("162.105.31.222",23)
print tn.read_eager()

print "ok"

output is:
------------
None

ok
------------

the host is avaiable,but my python program cannt connect to it ,why?
 
G

GrayGeek

??? said:
code below cannt work

import getpass
import sys
import telnetlib
import select

tn = telnetlib.Telnet()

print tn.open("162.105.31.222",23)
print tn.read_eager()

print "ok"

output is:

Could it be throwing an error that you are not trapping, so you don't see
it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,170
Messages
2,570,921
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top