[Tutor] Another prob with Telnet

Lloyd Kvam pythonTutor at venix.com
Fri Aug 13 20:09:38 CEST 2004

telnet applications usually map the enter key to transmit \n
local applications often see the enter key as \r

If you are writing the character through your code to the telnet
connection you may be writing \r (ctrl+m).

If you need to explicitly write other ctrl characters,
	ctrl+a == chr(1)
	ctrl+b == chr(2)

On Fri, 2004-08-13 at 13:53, Danny Yoo wrote:
> On Fri, 13 Aug 2004, Ali Polatel wrote:
> > I write a programme which connects to FICS via telnet but this site has
> > an interesting property...instead of pressing enter one should press
> > "ctrl+j" to enter commands etc. Any ideas to make this work in python?
> Hi Ali,
> But Control-j is the newline character; are you sure that pressing enter
> doesn't do the trick?
>     http://www.robelle.com/library/smugbook/ascii.txt
> contains a table that shows a map between the "control" keys and what they
> really stand for.
> Good luck to you.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358

voice:	603-653-8139
fax:	801-459-9582

More information about the Tutor mailing list