Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Sending Through ^] Through telnetlib

Reply
Thread Tools

Sending Through ^] Through telnetlib

 
 
John Abel
Guest
Posts: n/a
 
      01-23-2004
I have written a script that makes a telnet connection, runs various
commands, and returns the output. That was the easy bit However, to
close the session, I need to send ^] followed by quit. I've tried
sending chr(29), which is the ascii equivalent, but that doesn't seem to
work. Is there something I'm missing?

Any pointers would be much appreciated.

Thanks

J

 
Reply With Quote
 
 
 
 
Richard Brodie
Guest
Posts: n/a
 
      01-23-2004

"John Abel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> I have written a script that makes a telnet connection, runs various
> commands, and returns the output. That was the easy bit However, to
> close the session, I need to send ^] followed by quit.


Are you sure that just calling close() isn't what you want?
It would be unusual to send ^]quit on the wire.


 
Reply With Quote
 
 
 
 
jr
Guest
Posts: n/a
 
      01-23-2004
Try sending: '\x1d'

HTH
-jr

"John Abel" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> I have written a script that makes a telnet connection, runs various
> commands, and returns the output. That was the easy bit However, to
> close the session, I need to send ^] followed by quit. I've tried
> sending chr(29), which is the ascii equivalent, but that doesn't seem to
> work. Is there something I'm missing?
>
> Any pointers would be much appreciated.
>
> Thanks
>
> J
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
telnetlib close not closing sockets Mike Monaghan Python 4 10-07-2004 01:01 AM
Need help with telnetlib flakiness Stephen Ferg Python 1 02-06-2004 01:59 AM
RE: Sending Through ^] Through telnetlib Mahrt, Dallas Python 0 01-23-2004 07:04 PM
quest about telnetlib =?gb2312?B?1cXWvsP3?= Python 1 11-13-2003 11:28 PM
any telnetlib equivalent in Python for rlogin? walala Python 2 11-12-2003 02:40 PM



Advertisments