I have a requirement of executing a process that has to run with different arguments for every run and I am using the python subprocess to launch the application in a server. In order for the subprocess cmd to work I need to first make a connection to the application and then change the input parameters every time:
cmd = 'path of an Executable of an application' + 'arguments'
out = subprocess.Popen(cmd, bufsize=1, stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True)
Given this now I don't want to make a connection to the internal application every time. So is there an option to make the subprocess thread persistent and send the new application command to the existing thread?
Any help is appreciated!!! Thanks in Advance!!!