Escape sequences (colour) and padding with "%8s"%

Anton81 forum at anton.e4ward.com
Thu Aug 10 06:44:05 EDT 2006


> If you insist on building the codes yourself instead of using the
> standard curses library...
> 
> print '\x1b[34m%8s\x1b[0m' % 'TEST'

Will the curses library help? The problem is I need the colour coded in my
string and the "print pattern" is static.

What's the quickest way to solve this without having special print routines,
that handle "colour string objects"?

Anton



More information about the Python-list mailing list