Thanks for the investigative work! Using the terminal echo isn't really a solution, maybe it doesn't fail as often but it cannot work all the time. The terminal echo can and will occasionally (rarely) be interleaved with the stdout.
Did I mention that I hate pexpect ;-) -- You received this message because you are subscribed to the Google Groups "sage-release" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-release+unsubscr...@googlegroups.com. To post to this group, send email to sage-release@googlegroups.com. Visit this group at http://groups.google.com/group/sage-release. For more options, visit https://groups.google.com/d/optout.