git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

convert .py to Android ?


In comp.lang.python, Ben Finney  <ben+python at benfinney.id.au> wrote:
> "Steve" <Gronicus at SGA.Ninja> writes:
>> I have a working .py program
>> that I want to get into my Android Moto G phone.
> To my knowledge, an Android app must be implemented, at some level, in
> Java and specifically linked to Android Java libraries. That's a hard
> limitation of the Android platform.
> 
> That implies that any Python program will need to be written at least
> with partial awareness that it is not going to run in a native Python
> VM, but instead get compiled to somehow run in a Java Android environment.

If it doesn't have a GUI, the easy solution is put Termux on the phone,
run "pkg install python" (or python2), then install 'curl' or 'ssh' (for
scp) to transfer the program over. I use Termux scripts on my phone for
image preprocessing (namely strip exif and downscale) prior to using my
photos on the open web.

Elijah
------
also uses Termux as an ssh client