How can I run an external program automatically using Python script?
I installed a program that can analyze demographics. Let's say the program name is Demograph I am doing the following commands in the Windows command prompt to extract specific people's information.
Demograph hobby Baseball FileA > OutputfileA
FileA contains people's information. And this command can extract people who like baseball. I can change the baseball to soccer, swimming, etc. This command generates an OutputfileA. As the next step, I am doing the following command to further analyze the OutputfileA.
Demograph age 10-15 OutputfileA > OutputfileA2
This command can extract people's information whose ages are 10-15 from OutputfileA and then generate the OutputfileA2
However, typing this information on the command prompt every time is a pain. I want to do this automatically using Python script. Should I use "subprocess" to run the external program automatically?