Control codes (Re: Replacing control characters.)

Greg Ewing greg at cosc.canterbury.ac.nz
Tue Jan 23 17:55:04 EST 2001


Erno Kuusela wrote:
> 
> C-M would be '\x0d'. you can look at the ascii(7) manual page

A useful thing to know is that ^A is chr(1). So if
you know the letter you can just count up from there,
e.g. M is the 13th letter of the alphabet, so
^M is chr(13).

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list