[英]Convert a linux command to python command
Would you please say me how can I convert this code:请你告诉我如何转换此代码:
path to app/adb devices | awk 'NR>1{print $1}' | xargs -n1 -I% adb -s % install app.apk
to python command?到 python 命令?
You can always utilize the os.system()
method:您始终可以使用
os.system()
方法:
import os
command = "path to app/adb devices | awk 'NR>1{print $1}' | xargs -n1 -I% adb -s % install app.apk"
os.system(command)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.