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.

  • testfactorEnglish
    arrow-up
    15
    arrow-down
    2
    ·
    7 months ago
    link
    fedilink

    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.

    • skilltheampsEnglish
      arrow-up
      5
      arrow-down
      1
      ·
      7 months ago
      edit-2
      7 months ago
      link
      fedilink

      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

      • testfactorEnglish
        arrow-up
        6
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        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.

    • cybericOPEnglish
      arrow-up
      3
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      Thanks and yeah my bad.

    • cybericOPEnglish
      arrow-up
      2
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      Thanks! I’ll look into it

  • solrizeEnglish
    arrow-up
    7
    arrow-down
    0
    ·
    7 months ago
    link
    fedilink

    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).

    • cybericOPEnglish
      arrow-up
      2
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

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

      • andre4k14English
        arrow-up
        3
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

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

      • solrizeEnglish
        arrow-up
        2
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

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

        • cybericOPEnglish
          arrow-up
          1
          arrow-down
          0
          ·
          7 months ago
          link
          fedilink

          Well the dream is to write little programs while traveling

          • solrizeEnglish
            arrow-up
            1
            arrow-down
            0
            ·
            7 months ago
            link
            fedilink

            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_slimeEnglish
    arrow-up
    4
    arrow-down
    0
    ·
    7 months ago
    edit-2
    7 months ago
    link
    fedilink

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

    Ive run python from termux

    • cybericOPEnglish
      arrow-up
      1
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      Yes, I got them switched. My bad 🤦

  • db2English
    arrow-up
    4
    arrow-down
    0
    ·
    7 months ago
    link
    fedilink

    A what now

  • catloafEnglish
    arrow-up
    3
    arrow-down
    1
    ·
    7 months ago
    link
    fedilink

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