Android 为什么';monkeyrunner找到我的python模块了吗?
问题:Android 为什么';monkeyrunner找到我的python模块了吗?,android,python,jython,monkeyrunner,Android,Python,Jython,Monkeyrunner,问题: ImportError: No module named progress from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice from progress.bar import Bar print "Starting the script..." device = MonkeyRunner.waitForConnection(deviceId='FA489WM01202') y = 500 x2 = 50
ImportError: No module named progress
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from progress.bar import Bar
print "Starting the script..."
device = MonkeyRunner.waitForConnection(deviceId='FA489WM01202')
y = 500
x2 = 500
pause = 0.02
bar = Bar('Processing', max=40000)
for i in range(40000):
device.touch(x2, y, 'DOWN_AND_UP')
MonkeyRunner.sleep(pause)
bar.next()
bar.finish()
print "Finished the script..."
python代码:
ImportError: No module named progress
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from progress.bar import Bar
print "Starting the script..."
device = MonkeyRunner.waitForConnection(deviceId='FA489WM01202')
y = 500
x2 = 500
pause = 0.02
bar = Bar('Processing', max=40000)
for i in range(40000):
device.touch(x2, y, 'DOWN_AND_UP')
MonkeyRunner.sleep(pause)
bar.next()
bar.finish()
print "Finished the script..."
我的路径变量:
ImportError: No module named progress
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from progress.bar import Bar
print "Starting the script..."
device = MonkeyRunner.waitForConnection(deviceId='FA489WM01202')
y = 500
x2 = 500
pause = 0.02
bar = Bar('Processing', max=40000)
for i in range(40000):
device.touch(x2, y, 'DOWN_AND_UP')
MonkeyRunner.sleep(pause)
bar.next()
bar.finish()
print "Finished the script..."
- 路径-> [....];C:\jython2.7.0\bin;C:\jython2.7.0\Lib\site包;C:\Python34;C:\Python34\Lib\site包;D:\android\adt bundle\sdk;D:\android\adt bundle\sdk\tools;D:\android\adt bundle\sdk\platform tools
- ANDROID\u HOME->D:\ANDROID\adt bundle\sdk
- JAVA\u HOME->C:\Program Files\JAVA\jdk1.8.0\u 40
- JYTHON_主页->C:\jython2.7.0
- JYTHONPATH->C:\jython2.7.0\Lib
- PYTHON\u HOME->C:\Python34
- PYTHONPATH->C:\Python34\Lib
ImportError: No module named progress
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from progress.bar import Bar
print "Starting the script..."
device = MonkeyRunner.waitForConnection(deviceId='FA489WM01202')
y = 500
x2 = 500
pause = 0.02
bar = Bar('Processing', max=40000)
for i in range(40000):
device.touch(x2, y, 'DOWN_AND_UP')
MonkeyRunner.sleep(pause)
bar.next()
bar.finish()
print "Finished the script..."
- 通过cmd“python-mpipprogressinstall”安装进度模块
- 通过cmd“python setup.py install”安装进度模块
- 通过cmd“easy\u install progress”安装进度模块
站点包
文件夹或pip
的供应商
文件夹中,但该模块仍不工作。
即使在我将模块文件放在与脚本位置相同的目录中,它也不会工作。。。我现在没有主意了……也许能解决你的问题。@t米兰谢谢你的建议,听起来很有趣。我来测试一下。