pexpect/pexpect — pull request #57 by jquast (2014-05-25 18:32:54+00:00)
Title: Issue 20 close shouldnt sleep

should avoid blocking time.sleep() in __del__

Issue #20 is finally understood and closed by this
non-invasive fix -- although seemingly only occurring on
OSX, this call to to time.sleep() in __del__ is called at
regular intervals, especially more-so in python3 than
python2. Seemingly, only on OSX, this call to __del__
occurs mid-run during a call to spawn.expect_loop(),
causing either a TIMEOUT condition to occur, or an
exceptionally long blocking read (all the way up to
self.timeout), instead of the preferred EOF.