5

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

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

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

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

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 have also downloaded the last version from the repo, but nothing changes... I set the build target to 2.1update...

What could be? Anyone has any experience with this lib?

Thanks in advance ^^

Cheers

Erenwoid
  • 983
  • 6
  • 13
  • 25
  • 1
    You might have better luck using tinypy and the NDK. I'm sure part of the Java runtime isn't implemented (running new code on the fly) isn't implemented in Android – Joe Simpson Jun 18 '11 at 14:17
  • It's not what I'm lookin for, but great idea anyway ^^ – Erenwoid Jun 20 '11 at 18:44

1 Answers1

0

If you can deal with python instead of jython, Give QPython a try, you can load scripts from your device,whole projects and load from QR codes! It has a Console and editor too!

I don't currently have a tablet but it will be what I will be using when I do get one. Currently using it on a Note3.

Qpython Homepage

jams
  • 39
  • 1
  • 1
  • 10
  • 2
    Answering with language A when all three of the title, body and tag of the question does state the OP uses language B does not make your answer really relevant. – β.εηοιτ.βε Apr 07 '15 at 20:53