Within a Python script, I'm trying to execute the following sequence of events:
- Open a command window and run a program. When it completes, it outputs a text file.
- Once that text file has been created, close the program.
- After that has happened, run a new program using the text file as an input
Here's what I have so far:
subprocess.popen(['cmd','/c',r'programThatRuns.exe']) subprocess.wait() # ? subprocess.check_call()? kill? subprocess.popen(['cmd','/c',r'otherProgramThatRuns.exe'])
So I guess I'm really stuck on the second line