#!/usr/bin/python # -*- coding: utf-8 -*- # # Author: Tomi Ollila -- too ät iki piste fi # # Copyright (c) 2007 Tomi Ollila # All rights reserved # # Created: Sun Nov 11 09:33:24 EET 2007 too # Last modified: Fri Nov 16 17:33:23 EET 2007 too #from sys import stdout # print unichr(0x106).encode('utf-8') chars = ( range(32,127), range(160,256), range(256, 384), range(536,540) + [ 711, 728, 729, 731, 733 ], [ 7682, 7683, 7690, 7691, 7710, 7711, 7744, 7745, 7766, 7767, 7777, 7786, 7787, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8213, 8217, 8219, 8220, 8221, 8222, 8223, 8364] ) #print chars; import sys; sys.exit(0) def printchars(): for s in chars: l = [] for c in s: l.append(unichr(c)) print ''.join(l).encode('utf-8') # http://rtfm.etla.org/xterm/ctlseq.html # uxterm -xrm 'XTerm*italicULMode: on' # need recent XTerm (Patch #203 2005/07/06) (man xterm) # .. except the above works only with TrueType fonts (2007/11/12) # so, one must do: xterm -fn fat7x16 & xterm -fn fat7x16i; def csi(string): print '\033[%s' % string #stdout.write('\033[%s' % string) # add xterm escapes for italic, bold, bold-italic and back to normal printchars() csi('1m') printchars() csi('4m') printchars() csi('0m')