Jython for Android

I am testing Jython for Android, taken from here http://code.google.com/p/jython-for-android/

Unfortunately, I have a problem during startup ... I tried to import all the libraries in one of my projects and in the onCreate method of my activity I put this code:

PythonInterpreter interpreter = new PythonInterpreter(); interpreter.exec("print 'hello from Jython!' "); 

This code should work (as in standard java do), but I get the following:

 Traceback (innermost last): (no code object) at line 0 java.lang.NullPointerException at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:104) at org.python.core.Py.compile_flags(Py.java:1685) at org.python.core.Py.compile_flags(Py.java:1698) at org.python.core.Py.compile_flags(Py.java:1706) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:135) at org.python.util.InteractiveConsole.interact(JythonForAndroidTest.java:29) 

I also downloaded the latest version from the repo, but nothing changed ... I set the build target in 2.1update ...

What could be? Does anyone have any experience with this lib?

Thanks in advance ^^

Greetings

+4
source share
1 answer

If you can work with python instead of jython, try QPython, you can download scripts from your device, entire projects and download from QR codes! It also has a console and editor.

I don’t have a tablet at present, but that will be what I will use when I receive it. Currently used on note 3.

Qpython Home Page

0
source

All Articles