(text)
| 83 | |
| 84 | |
| 85 | def remove_ansi_escape_sequences(text): |
| 86 | # http://stackoverflow.com/questions/14693701/how-can-i-remove-the-ansi-escape-sequences-from-a-string-in-python |
| 87 | # remove all ansi escape sequences |
| 88 | #return regex.sub(r'(\x9b|\x1b\[)[0-?]*[ -\/]*[@-~]|[ ]*\r', '', text) |
| 89 | text = regex.sub(r'(\x9b|\x1b\[)[0-?]*[ -\/]*[@-~]', '', text) |
| 90 | text = regex.sub(r'[ \r]*\n', '\n', text) # also clean up the line endings |
| 91 | return text |
| 92 | |
| 93 | # helper for running sut as subprocess within pty |
| 94 | # does two things |
no outgoing calls
searching dependent graphs…