1

Currently, I have a Python application which opens (via subprocess) an executable, waits for the user to input certain values on the GUI and perform a calculation, and then, upon closing this executable, reads in the output file back into my Python application for further processing.

I would like, however, to pass variables directly from my application and input these into the entry blocks on the external GUI.

Is this possible?

Ben D.
  • 31
  • 5
  • Can we see your code? You're trying to interact with another application programatically but using its GUI instead. It could easy your life if you could communicate with such application via other protocols. Can I also ask which application are you trying to use? – Héctor Valverde Apr 01 '16 at 15:51
  • The relevant code is only using subprocess.Popen("xxx.exe") to launch the external application. The application I'm trying to use is a very old custom written program that purely requires ~10 inputs from the user and then outputs a text file. So, I've successfully implemented opening the external application, waiting on the user to perform the calculation, and reading in the text file but I'm trying to find a way to pass these input values to from my application to this external one. Thanks! – Ben D. Apr 02 '16 at 07:06
  • related: [Interact with other programs using Python](http://stackoverflow.com/q/14288177/4279). Especially, [@Matteo Italia's comment](http://stackoverflow.com/a/14338006/4279) – jfs Apr 02 '16 at 23:49

1 Answers1

1

For anyone that may be interested, the PyAutoGUI module provides the functionality I was interested in: https://pyautogui.readthedocs.org/en/latest/

Ben D.
  • 31
  • 5