Python on Android

Hi everyone,

For a couple of months I had to take a trip and I couldn’t bring my computer with me. So I installed the Python IDE Pydroid on both my android phone and tablet. That has been my tool to LPTHW.

I want to know your opinion about using android devices to write Python code. I’m trying to learn what are the limitations of this practice.

So far the IDE have worked great for me. It has a built- in bash, so I’ve been able to run the code from the command line.
The only thing I couldn’t do so far is to create virtual envs. Based on the error message I get I suspect it’s because my devices are not rooted.

Another curious thing is that in one of my devices that runs on Android 4.4, I encountered a interesting behaviour when started to use nose from ex46:
-If I run simply nosetests it doesn’t run any tests.
-Only when I run nosetests --exe all the tests work.

I tried that after reading a post about Ubuntu behaving a similar way.
I know that Android is built over Linux so maybe there’s a link between Ubuntu and this older version of Android.
I don’t have much knowledge about Linux, so bear in mind that I’m just trying to learn more about all this.

I couldn’t find much info online about this particular IDE or about writing python on Android. So any insight you can give me about all these things will be greatly appreciated.

This is my first post, so I’m sure it’ll come out very messy :sweat_smile:
All suggestions are welcome.

Interesting. Well normally tablets can’t support enough shell access to do Python, but if this Pydroid works then it should be fine for learning. For full development I don’t know. You’d need a way to get the files off the tablet, or send them to someplace like

1 Like

Yeah, definitely for full development the tablet would be either limited or too messy to use.
Although, I have to say that I got impressed of how fluent you can get at writing code on a screen keyboard if you do it for long enough :sunglasses:.
That being said, I can’t wait to get home and use the computer again.

@zedshaw do you think that the requirement of running nose with –exe is related to this Android situation?
Or maybe I’m screwing it up somewhere?

By the way, thanks and great job with both the books and this forum. It really seems to be a very friendly and useful environment to learn how to code.

It’s probably just an android thing. Check out PyTest instead:

1 Like

Yes, It’s definitely an android issue, and apparently an issue on that version of android.
I tried the same in a newer device and nosetests ran normally.

A free service run by Zed A. Shaw for