Sending Through ^] Through telnetlib

jr grreeder at
Fri Jan 23 18:47:50 CET 2004

Try sending:  '\x1d'


"John Abel" <john.abel at> wrote in message news:mailman.687.1074866920.12720.python-list at
> 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

More information about the Python-list mailing list