telnetlib echo'ing
denton
denton_99_2000 at my-deja.com
Wed Aug 16 19:42:20 EDT 2000
i have been messing with the telnetlib, more specifically the 'interact'
method. it works fine, but everything i enter is echo'd back to the
screen. can this echo'ing be removed?
this is the 'interact' code:
while 1:
rfd, wfd, xfd = select.select([self, sys.stdin], [], [])
if self in rfd:
try:
text = self.read_eager()
except EOFError:
print '*** Connection closed by remote host ***'
break
if text:
sys.stdout.write(text)
sys.stdout.flush()
if sys.stdin in rfd:
line = sys.stdin.readline()
if not line:
break
self.write(line)
i have tried filtering out the 'line' from 'text', but it is echo'ed
anyway.. any ideas?
--denton
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list