Capturing output with input

Gabriel Genellina gagsl-py2 at
Mon Oct 29 05:03:35 CET 2007

En Sun, 28 Oct 2007 15:39:07 -0300, gopala <krishna.ggk at>  

> My initial attempts of using spawn.. , exec.. pipe.. failed since they
> can't capture the std input and std output continuously.
> The lab1.exe will be something like
> Enter 2 nos
> 2 3
> The sum is 5
> Now i should be able to capture all these.
> Is this possible ? If so please do give me some hints on how to
> achieve this.

On Linux, use the "script" command.
On Windows, select the region to copy using the mouse and paste it onto a  
notepad file.
I don't think Python would help here.

Gabriel Genellina

More information about the Python-list mailing list