pexpect: TIMEOUT no longer clears child.before

Discussion in 'Python' started by Adrian Casey, May 19, 2011.

  1. Adrian Casey

    Adrian Casey Guest

    The behaviour of pexpect has changed between version 2.1 and 2.3. In
    version 2.1, the following code would result in child.before being
    cleared -:

    >>>child.expect(pexpect.TIMEOUT,1)



    In version 2.3, this is no longer the case. No matter how many times
    the above code is run, child.before continues to hold the output from
    previous commands. It is important to be able to clear the contents of
    child.before between each command. What is the correct way to do this
    in version 2.3?

    Adrian.
    Adrian Casey, May 19, 2011
    #1
    1. Advertising

  2. En Thu, 19 May 2011 08:29:21 -0300, Adrian Casey <>
    escribió:

    > The behaviour of pexpect has changed between version 2.1 and 2.3. In
    > version 2.1, the following code would result in child.before being
    > cleared -:
    >
    > >>>child.expect(pexpect.TIMEOUT,1)

    > In version 2.3, this is no longer the case. No matter how many times
    > the above code is run, child.before continues to hold the output from
    > previous commands. It is important to be able to clear the contents of
    > child.before between each command. What is the correct way to do this
    > in version 2.3?


    Try contacting the author: www.noah.org

    --
    Gabriel Genellina
    Gabriel Genellina, May 25, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Rodriguez
    Replies:
    23
    Views:
    1,118
    David Schwartz
    Dec 9, 2003
  2. Andrew
    Replies:
    2
    Views:
    636
    Leon Mayne
    Jan 21, 2008
  3. Saqib Ali
    Replies:
    1
    Views:
    361
    Roy Smith
    Dec 26, 2011
  4. Dave Angel
    Replies:
    0
    Views:
    150
    Dave Angel
    Dec 5, 2012
  5. Z W
    Replies:
    0
    Views:
    172
Loading...

Share This Page