On my linux box the display from expect() always prints ESC[?2004h or ESC[?2004l before the prompt and that brakes the expect() itself. On the web I found that those codes could be xterm CSI codes (see wiki) so I changed the regex in strip_ansi_codes() to handle them.
On my linux box the display from expect() always prints
ESC[?2004h
orESC[?2004l
before the prompt and that brakes the expect() itself. On the web I found that those codes could be xterm CSI codes (see wiki) so I changed the regex instrip_ansi_codes()
to handle them.