I have been struggling with a Pexpect script. I am 'expect'ing a couple of strings or a timeout. When the strings are found, that works fine. However, when I get a timeout I want to get the output at that point, if any, but cannot find a way to do it. It seems like 'before', 'after' and 'readline' do not work in an 'except proc.TIMEOUT' block. Actually I cannot get 'readline' to work at all. How do I determine if there was any output and if so get it? TIA.