I tried a lot, and believe me, it would be better for you to find an
alternative, multiprocessing require os level functions that android
don't provide, and won't ever provide, according to the android
developpers. I put some of the details of my attempt here
http://blog.tshirtman.fr/2012/11/13/debugging-python-for-android-with-gdb
if you are interested, but don't lose too much of your time onto this.
Also, i didn't look much into the sl4a code you point to, but tito did,
and says that it's just a copy of the code from python, without fixing
anything, and that it won't help, if he says this, i'm willing to
believe him, as he usually knows better than me.
On Thu, Apr 11, 2013 at 11:03:23AM -0700, Yurij Mikhassiak wrote:
> After instalation of sl4a's python for android I see that in *
> /sdcard/com.googlecode.pythonforandroid/extras/python* we have *multiprocessing
> folder* with __init__.pyc allot of other .pyc files.
> I also have *_multiprocessing.so* *in*/sdcard/com.googlecode.pythonforandroid/python_r16.zip/python 2.6/
> *lib-dynload *
> Is it somehow possible to* import this/other module/modules to my app*?
>
> I really need this module :(
>
> Regards, Yurij
>
>
> >
> > Четвер, 11 квітня 2013 р. 18:14:51 UTC+3 користувач qua-non написав:
> >>
> >> The folder-name is just a symlink, don't worry about that.
> >>
> >> Multiprocessing isn't supported on android. There were a few attempts to
> >> get it to work,
> >> however it turns out android doesn't allow/like multiprocessing.
> >>
> >> You are welcome to try it out yourself though, maybe you'll have more
> >> luck.
> >> Take a look at building a recipe for it under python-for-android.
> >>
> >> Best Regards
> >>
> >>
> >> On Thu, Apr 11, 2013 at 8:38 PM, Yurij Mikhassiak <
mikha...@gmail.com>wrote:
> >>
> >>> My program works ok in linux. Tried to run it in android with kivy 1.5.1
> >>> installed.
> >>>
> >>>
> >>> Part of info from logcat:
> >>>
> >>> I/python (17717): Initialize Python for Android
> >>> I/python (17717): ['/data/data/org.kivy.pygame/**
> >>> files/lib/python2.7/site-**packages', '/data/data/org.kivy.pygame/**
> >>> files/lib/site-python']
> >>> I/python (17717): Android path ['/data/data/org.kivy.pygame/**files/lib/python27.zip',
> >>> '/data/data/org.kivy.pygame/**files/lib/python2.7',
> >>> '/data/data/org.kivy.pygame/**files/lib/python2.7/lib-**dynload',
> >>> '/data/data/org.kivy.pygame/**files/lib/python2.7/site-**packages',
> >>> '/mnt/sdcard/kivy/XYZ controller', '/data/data/org.kivy.pygame/**
> >>> files/lib/python2.7/site-**packages/PIL']
> >>> I/python (17717): Android kivy bootstrap done. __name__ is __main__
> >>> I/python (17717): Run user program, change dir and execute main.py
> >>> I/python (17717): Traceback (most recent call last):
> >>> I/python (17717): File "main.py", line 3, in <module>
> >>> ...
> >>> I/python (17717): import multiprocessing as mp
> >>> I/python (17717): File "*/home/tito/*code/python-for-**
> >>> android/build/python-install/**lib/python2.7/multiprocessing/**__init__.py",
> >>> line 84, in <module>
> >>> I/python (17717):* ImportError: No module named _multiprocessing*