3

I am trying to create an Android App which has the function to upload a python file and then to run one of the python functions.

I have looked through the other questions, all the other suggestions are basically an App itself which can run python (Is there a way to run Python on Android?) What I am trying to do is to execute a python file from my own App (an additional codes to my existed one).

I have been using Jython and till now it is not yet working and I have just read in Jython website about '...some of the reasons why mobile deployment is not yet a viable option for Jython. While a couple of targets exist in the mobile world, namely Android and JavaFX, both environments are still very new ...' http://www.jython.org/jythonbook/en/1.0/DeploymentTargets.html

Thank you for your kind suggestions.

Community
  • 1
  • 1

1 Answers1

0

Have a look at the Scripting Layer 4 Android. Here is a short excerpt what you can do with this framework:

"Scripting Layer for Android (SL4A) brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device. These scripts have access to many of the APIs available to full-fledged Android applications, but with a greatly simplified interface that makes it easy to get things done. "

There is also the whole source of the project, so maybe you can try to get some ideas of it how to solve your problem.

Obl Tobl
  • 5,604
  • 8
  • 41
  • 65
  • Hey, thank you for your answer. Tried on that, but I still have problems on it. Don't even know how to merge them in one project. Thried to look for some examples online too, but could not find any. Guess there is no one have tried to create an App which run the Python file on their App directly, instead of using the SL4A app. – user2377054 Jul 25 '13 at 11:33
  • i haven't tried it on my own, just know about the project and the app. There is a project seperated from SL4A, it's just about python on android, maybe this can help you more: http://code.google.com/p/python-for-android/source/browse/ but i think actually it's the same, just the newer version. – Obl Tobl Jul 25 '13 at 11:37
  • Have been trying but it does not work, I do think thank that it is not possible to do so yet. Thank you, though. – user2377054 Jul 29 '13 at 08:20