Using expect() and interact() simultaneously in pexpect
问题 The general problem is, that I want to use pexpect to call scripts that require sudo rights, but I don't always want to enter my password (only once). My plan is to use pexpect to spawn a bash session with sudo rights and to call scripts from there. Basically I always want to keep the session busy, whenever one script stopped, I want to start another. But while the scripts are running, I want the user to have control. Meaning: The scripts should be called after something like expect("root@"),