Ed Warnicke
-
2004-01-15
This patch adds a method spawn.expect_lookahead() which
takes
exactly the same arguments as spawn.expect() and
behaves the same way, except that it doesn't strip any
data from the buffer, it
essentially does the following after it calls
spawn.expect():
self.buffer = self.before + self.match.group() +
self.buffer
This is useful when you need to lookahead to decide
which of several pexpect functions to run to continue a
conversation.