I need functionality similar to the Unix expect from within a Python script, as an external executable is prompting for password. I am currently doing this:
p = subprocess.Popen("execA",stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
where execA is prompting for password. I'd like to wrap it with "expect" to supply said password.
There seem to be a few alternatives:
What is the best way to do this? If there's a more efficient way to go about it, I'd love to know.