TA的每日心情 | 擦汗 2 小时前 |
---|
签到天数: 527 天 连续签到: 4 天 [LV.9]测试副司令
|
1测试积点
问题:
Python 中使用 pyadb 时,始终找不到 adb!!
#coding=utf-8
- <font face="微软雅黑" size="3">try:
- import sys,os,pyadb
- from pyadb import ADB
- from os import popen3 as pipe
- except ImportError,e:
- # should never be reached
- print "[f] Required module missing. %s" % e.args[0]
- sys.exit(-1)
- def ADB_Check():
- adb =ADB()
- adb_path="D:/android/android-sdk-windows/platform-tools/adb"
- if adb.set_adb_path(adb_path)is True:
- print "Version: %s" % adb.get_version()
- else:
- #print "Check ADB binary path"
- print "请检查adb路径!"
- if __name__ == "__main__":
- ADB_Check()</font>
复制代码
|
|