Android 如何在monkeyrunner代码中运行外部程序?

Android 如何在monkeyrunner代码中运行外部程序?,android,centos,jython,monkeyrunner,Android,Centos,Jython,Monkeyrunner,我有一个monkeyrunner代码(文件扩展名是.py),它运行良好。我正在使用CentOS。现在,我需要运行一个外部程序,我需要在monkeyrunner代码中插入该代码。我该怎么做?我需要导入什么?命令是什么 您应该使用该模块 import subprocess # Your code ... # Call the external program/ script: subprocess.call('your script', shell = True)

我有一个monkeyrunner代码(文件扩展名是.py),它运行良好。我正在使用CentOS。现在,我需要运行一个外部程序,我需要在monkeyrunner代码中插入该代码。我该怎么做?我需要导入什么?命令是什么

您应该使用该模块

import subprocess
# Your code ...  

# Call the external program/ script:
subprocess.call('your script', shell = True)