Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Pexpect Timeout Problem

Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!