[issue24574] ANSI escape sequences breaking string justification

2015-07-06 Thread R. David Murray
R. David Murray added the comment: See issue 12499 for an RFE to textwrap that would at least partially address this use case. -- nosy: +r.david.murray ___ Python tracker ___ __

[issue24574] ANSI escape sequences breaking string justification

2015-07-06 Thread Eric V. Smith
Eric V. Smith added the comment: strings are unaware of any ANSI escape sequences or other structure that is being ascribed to their contents. The '\033' escape character is being counted, as are the rest of the characters in that string. Since the string is already at least 10 characters long

[issue24574] ANSI escape sequences breaking string justification

2015-07-06 Thread Krzysztof Słychań
New submission from Krzysztof Słychań: Strings containing ANSI escape sequences are not justified if the length including escape sequences exceeds the field width. Testcase: Let's make a string with escape sequences - bold, for example: >>> string = '\033[01m' + 'bold' + '\033[0m' String lengt