I want to write a python script which can launch an application.The application being launched can also read python commands which I am passing through another script.
The problem I am facing is that I need to use two python scripts, one to launch an application and second one to run commands in launched application.
Can I achieve this using a single script? How do I tell python to run next few lines of script in launched application?
I want to write a python script which can launch an application.The application being
Share
In general, you use
subprocess.Popento launch a command from python. If you set it as non-blocking, it’ll let you keep running python statements. You also have access to the running subprocesses stdin and stdout so you can interact with the running application.If I understand what you’re asking, it’d look something like this: