22
submitted 4 months ago* (last edited 4 months ago) by cyberic@discuss.tchncs.de to c/android@lemmy.world

I'm looking for an Android python ~~compiler~~ interpreter that runs locally on my phone. Any suggestions are appreciated. FOSS apps preferred of course.

Edit: changed compiler to interpreter

Edit 2: I ended up going with Pydroid3. I wish there was a FOSS alternative.

all 17 comments
sorted by: hot top controversial new old
[-] testfactor@lemmy.world 13 points 4 months ago

You're gonna get mocked for saying compiler instead of interpreter, since python isn't compiled.

But, to answer the spirit of your question, I've had good experiences with "Pydroid 3." Clean interface and gets the job done.

[-] skilltheamps@feddit.de 4 points 4 months ago* (last edited 4 months ago)

Well it is compiled to byte code in a first step, and this byte code then gets processed by the interpreter. Now Java does the exact same thing: gets compiled to byte code which then gets executed by the jvm (java virtual machine), which is essentially a interpreter that is just a little simpler than the python one (has fewer types for example). And yet, nobody talks about a java interpreter

[-] testfactor@lemmy.world 6 points 4 months ago

I think there's several reasons for that, not the least of which is that you can't distribute python bytecode.

With java, I run through an intentional compilation step and then ship the jar file to my consumers. I'd never ship a .pyc to the field.

In python (specifically cpython), that step is just an implementation detail of the interpreter/runtime.
If you ever used something other than the default python interpreter, it probably wouldn't implement the same bytecode subsystem under the hood. Python bytecode isn't part of the spec.

[-] cyberic@discuss.tchncs.de 3 points 4 months ago

Thanks and yeah my bad.

[-] codapine@lemm.ee 8 points 4 months ago

You're looking for the Python interpreter as Python does not compile (unless you want to get pedantic about .pyc files). Here's probably your best resource - https://opensource.com/article/20/8/python-android-mobile

[-] cyberic@discuss.tchncs.de 2 points 4 months ago

Thanks! I'll look into it

[-] solrize@lemmy.world 7 points 4 months ago

You can run Python under Termux if that suffices. If you want to write gui apps in python, look at kivy.org though it is maybe not so easy to use (I have not tried it).

[-] cyberic@discuss.tchncs.de 2 points 4 months ago

I'm mostly looking for an IDE that can work with it if possible

[-] andre4k14@feddit.de 3 points 4 months ago

(Acode + Python Plugin) + Termux You can install them via F-Droid

[-] solrize@lemmy.world 2 points 4 months ago

On a phone?! Maybe write your programs on a desktop, then move them to the phone.

[-] cyberic@discuss.tchncs.de 1 points 4 months ago

Well the dream is to write little programs while traveling

[-] solrize@lemmy.world 1 points 4 months ago

Get a small laptop, really. Don't expect to code on a phone. You can run an sshd under termux and an ide on the laptop, I guess, to easily push code to the phone. You can even run emacs on the phone and use it through ssh (IDEs are for hipsters anyway). But what kinds of programs are these? If they don't have to run on the phone, a laptop with a normal dev environment will be a lot nicer.

[-] squid_slime@lemmy.world 4 points 4 months ago* (last edited 4 months ago)

Sorry for being maybe dumb on this subject but doesn't python run uncompiled like bash scripting does?

Ive run python from termux

[-] cyberic@discuss.tchncs.de 1 points 4 months ago

Yes, I got them switched. My bad 🤦

[-] db2@lemmy.world 4 points 4 months ago
[-] catloaf@lemm.ee 2 points 4 months ago

Maybe py2c? You'd need gcc and cython, and while I'm sure gcc is available I doubt cython is.

this post was submitted on 26 Mar 2024
22 points (95.8% liked)

Android

27243 readers
49 users here now

DROID DOES

Welcome to the droidymcdroidface-iest, Lemmyest (Lemmiest), test, bestest, phoniest, pluckiest, snarkiest, and spiciest Android community on Lemmy (Do not respond)! Here you can participate in amazing discussions and events relating to all things Android.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules


1. All posts must be relevant to Android devices/operating system.


2. Posts cannot be illegal or NSFW material.


3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.


4. Non-whitelisted bots will be banned.


5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.


6. Memes are not allowed to be posts, but are allowed in the comments.


7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.


8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.


Community Resources:


We are Android girls*,

In our Lemmy.world.

The back is plastic,

It's fantastic.

*Well, not just girls: people of all gender identities are welcomed here.


Our Partner Communities:

!android@lemmy.ml


founded 1 year ago
MODERATORS