New submission from Michael Enßlin:
This issue was previously addressed and fixed here:
http://bugs.python.org/issue1351692
When subclassing PrettyPrinter, overriding the format() method should allow
users to define custom pretty-printers.
However, for objects whose repr is short, format
Michael Enßlin added the comment:
Terry, i guess you are right; it is indeed not the job of python to know how
its terminal will print characters; there is a whole lot of issues to consider,
such as terminal unicode support, control characters, ansi escape sequences,
terminal-specific escape
Michael Enßlin added the comment:
The issue might very well be strictly related to GNU readline.
I have both successfully reproduced it in a C program:
#include
#include
int main() {
readline("\x1b[31;1mthis is a bold red prompt\x1b[m> ");
}
gcc -lreadline test.c
an