Description
Interactive terminal programs can be automated from legacy Python 2 scripts. Pexpect helps tests and admin tools spawn commands, wait for prompts, and send responses through pseudo-terminals.
It can run arbitrary commands and may handle passwords or shell prompts. Avoid logging sensitive interaction transcripts and review commands before automation.