Reham1 / python-for-android

Automatically exported from code.google.com/p/python-for-android
Apache License 2.0
0 stars 0 forks source link

How can I import my own Modules? #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.the code:
import android
import sys
from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice,MonkeyImage

droid = android.Android()
droid.makeToast('Hello, Android!')
print 'Hello world!'

MonkeyRunner.sleep(1)
device.touch(260,750,'DOWN_AND_UP')

when i run the above code,it shows ImportError:
no module named com.android.monkeyrunner

What is the expected output? What do you see instead?
the problem is that I want to use module named com.android.monkeyrunner which 
in android-sdk-windows/tools/lib/monkeyrunner.jar.
I hope the python-for-android can add monkeyrunner.jar into "Import Modules"
What version of the product are you using? On what operating system?
the version is Latest versions,interpreter:ND,extras:14,scripts:13
my operating system is win7

Please provide any additional information below.

the monkeyrunner.jar in Attach a file

Original issue reported on code.google.com by guost...@gmail.com on 28 May 2012 at 4:02

Attachments:

GoogleCodeExporter commented 8 years ago
Looking forward to your reply,thank you very much

Original comment by guost...@gmail.com on 28 May 2012 at 4:03

GoogleCodeExporter commented 8 years ago
Python modules don't work like that.

Original comment by rjmatthews62 on 28 May 2012 at 5:16