0

I wish to execute a python script inside an Android app like we do on CLI like

$python script.py arg1

I hope there is something like following to achieve what we are trying.

something.execute("script.py arg1");

I have came across SL4A but cannot find a starting point to it. Let me know if I should dig some more into it.

Ayush Goyal
  • 2,079
  • 8
  • 32
  • 47
  • sl4a should let you do that ... you should probably dig into that more (although in android land I think its more like `startIntent` than `something.execute` ... what makes you think a python script is the appropriate solution to your problem? it might be better to pursue a different solution all together – Joran Beasley Oct 01 '14 at 22:01
  • What I intend to do has been done in that particular script so I would like to use it as-is. – Ayush Goyal Oct 01 '14 at 22:07
  • you may spend much more effort in running the script ... and if there are libraries it uses written in C they may not be available in SL4A ... you are almost certainly better off converting it to java ... if you cannot do that maybe you could have it run on some remote webserver then just call a url from java to make it run .... you are almost certainly going to have a significant amount of pain getting it to run on android ... and you will likely have to change parts of the script anyway – Joran Beasley Oct 01 '14 at 22:09
  • I was going for calling it remotely, thought I'd ask here first if any such solution exists. Yes, you may be correct.. – Ayush Goyal Oct 01 '14 at 22:13

0 Answers0