telnetlib

Peter Yu roger_callisto at hotmail.com
Mon Jul 31 20:36:56 EDT 2000


In article <8m4opv$fpi$1 at nnrp1.deja.com>,
  bragib at my-deja.com wrote:
> Maybe you can offer some suggestions on this:
> This is a repost as I am still clueless!
>
>  Bragi
>
>  I am trying to telnet from a UNIX box to an NT to get the doskeys.
The
> NT that I login to runs a
>  couple of .bat
>  scripts which clear the screen set up some stuff etc.  When I try to
do
> a read_all() it fails the first
>  time with the
>  exception:
>  Traceback (innermost last):
>    File "telnet.py", line 17, in ?
>      tn.read_all()
>    File "/usr/abaqus60/5-0_copy/source/Python/Lib/telnetlib.py", line
> 229, in read_all
>      self.fill_rawq()
>    File "/usr/abaqus60/5-0_copy/source/Python/Lib/telnetlib.py", line
> 367, in fill_rawq
>      buf = self.sock.recv(50)
>  socket.error: (131, 'Connection reset by peer')

Try reading before exiting... the stream probably noticed that
you "logged off" and tried to close off the connection.  Since I don't
have a NT machine handy to test my theory, that'd be my best guess as
to why you're getting the error.


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list