I have an Visual studio application which takes interactive arguments like
- PATH
On input , MENU #1 is displayed (which again accepts arguments/user input) and again on input , MENU #2 is displayed.
I need to call this VS application (exe) from Python . I have limitation to stick to Python 2.5 version.
I tried using subprocess.popen and stdin.write.
I am able to parse through MENU#1 but unable to proceed further to MENU #2 and so on...
Any hints/examples on achieving the above.?
My code looks like:
p = subprocess.Popen('app.exe',stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=None)
p.stdin.write(file_path) # for menu 1
time.sleep(0.5)
p.stdin.write('0') # for menu 2..
...
o,e = p.communicate()