介紹
Pexpect is a pure Python module for spawning child applications;
controlling them; and responding to expected patterns in their output.
https://pexpect.readthedocs.io/en/stable/