more tricks to treat with pexpect buffers