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

Anton81 forum at anton.e4ward.com
Wed Aug 9 13:48:11 EDT 2006


Hi all!

I used escape sequences to produce colour output, but a construct like

print "%8s" % str_with_escape

doesn't do the right thing. I suppose the padding counts the escape
characters, too.

What could be a solution?

Anton



More information about the Python-list mailing list