1

I have a monkeyrunner code (file extension is .py) which is working fine. I am using CentOS. Now, I need to run a an external program and I need to insert that code in the monkeyrunner code. how do I do it? What do I need to import and what is the command?

srh snl
  • 797
  • 1
  • 19
  • 42

2 Answers2

0

You should use the subprocess module.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
0
import subprocess
# Your code ...  

# Call the external program/ script:
subprocess.call('your script', shell = True)
Gabriel Porumb
  • 1,661
  • 1
  • 12
  • 21