I have an installation of Android sdk on my machine. And I am using monkeyrunner to execute a bunch of code.
Now the problem is I also need py-serial package that comes with CPython in my code (that I am running with Jython). I tried adding sys.path.append('C:\\\\Python27\\\\lib\\\\site-packages')
to my Jython code so that I can use serial package, but that failed miserably.
My question is how can I use external CPython packages with Jython that comes with Android sdk install?
You can use AndroidViewClient/culebra as a drop-in replacement for monkeyrunner.
$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import com.dtmilano.android.viewclient
>>> import serial
>>>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.