p expect

summary

Most likely this starts a terminal emulator and then can read the stdout and sterr from the terminal emulator (shell?) that it starts.

important

https://github.com/selectel/pyte https://github.com/pexpect/pexpect/issues/88