http://www.perlmonks.org?node_id=850674


in reply to Wrap around an interactive python script

Expect is designed to work with interactive programs. One of the things it does is use a pseudo tty. This "fools" most programs into disabling output buffering.