Escape sequences (colour) and padding with "%8s"%
Gabriel Genellina
gagsl-py at yahoo.com.ar
Thu Aug 10 06:34:50 EDT 2006
At Thursday 10/8/2006 07:04, Anton81 wrote:
>For example:
>
>print '%8s' % '\x1b[34mTEST\x1b[0m'
>
>doesn't not indent 'TEST' whereas
>
>print '%8s' % TEST'
>
>works.
If you insist on building the codes yourself instead of using the
standard curses library...
print '\x1b[34m%8s\x1b[0m' % 'TEST'
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the Python-list
mailing list