Hello all I am new to asking questions on websites like this, so please help me out if I go astray (or if clarification is needed). Here goes:
I have built a python script that successfully launches a program as a new process (or subprocess? is that a real thing?) in Windows 7. The program, and its GUI, open and run a specific text file, and when complete the resulting data is saved out to a .csv and the program and process are terminated. The relevant python code is below:
import subprocess
import os
pw_directory = r"C:\Program Files (x86)\..." #directory of theProgram.exe
master_directory = r"C:\Users\...." #path to the .txt file that is executed in theProgram.exe
os.chdir(pw_directory)
my_process = subprocess.Popen([r"theProgram.exe", master_directory])
My question is: is there a way to suppress the program's GUI interface when it is launched as a new process? I just want to load the .txt file and execute it in the background as there is no reason to interface with the GUI since everything is automated.
In an effort to make the question general, I have not included theProgram.exe name, though this may be necessary information. Not sure. Thanks for any advice.