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. Advertisements

  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. Advertisements

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,548
    David Schwartz
    Dec 9, 2003
  2. Adrian Casey

    pexpect: TIMEOUT exception never raised

    Adrian Casey, May 12, 2005, in forum: Python
    Replies:
    0
    Views:
    2,415
    Adrian Casey
    May 12, 2005
  3. Andrew
    Replies:
    2
    Views:
    734
    Leon Mayne
    Jan 21, 2008
  4. Phoe6
    Replies:
    2
    Views:
    1,287
    Senthil Kumaran
    Jun 8, 2009
  5. Pankaj

    timeout restart in pexpect

    Pankaj, Mar 3, 2010, in forum: Python
    Replies:
    0
    Views:
    526
    Pankaj
    Mar 3, 2010
  6. Saqib Ali
    Replies:
    1
    Views:
    551
    Roy Smith
    Dec 26, 2011
  7. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,604
    Brian Candler
    Oct 6, 2004
  8. Z W
    Replies:
    0
    Views:
    356
Loading...