I develop a python gui for a c program. The Program asks for two passwords. How can I wait for the password promt and then insert the password in code?
At the moment I try to do this via:
subprocess.popen.communicate(input)
But that doesn't work as the program asks for the password in the shell again.
Just for your understanding here is the flow of the program:
- shell: execute the program with some parameters
- stdout: "please insert pw 1"
- stdin: pw1
- stdout: "please insert pw 2"
- stdin: pw2