Python pexpect module's "spawn" class lets you interact with a spawned child process.

As per its official API documentation on http://pexpect.sourceforge.net/pexpect.html


*************** *************** *************** ****
The maxread attribute sets the read buffer size. This is maximum number
of bytes that Pexpect will try to read from a TTY at one time. Setting
the maxread size to 1 will...