I have a Mac program with a command line interface that I am trying to automate from Python. So far I have:
os.system("cd /Applications/program/MyApp.app/Contents/bin/; ./MyApp -prompt;")
Which runs the CLI. Now I want to enter a command into the command line from Python. Is there a way to pass this in as an argument to the first command?
Example:
os.system("cd /Applications/program/MyApp.app/Contents/bin/; ./MyApp -prompt; and then run MySpecialCommand in CLI")
I'm not commited to a specific approach, I just need to be able to enter the command into the CLI from a python script.