Is there a useable Python for Android devices?

Status
Not open for further replies.

allen

Ars Scholae Palatinae
756
Subscriptor
I'm interested in finding Python environments which will run on tablets. My aim here is not to write apps for the tablets, but more to exercise my programming skills while I am travelling.

For the iPad I came across what seems to be an elegant Python environment in the form of http://omz-software.com/pythonista/. Is there something comparable for Android tablets?

A quick search in Google Play produced only QPython+ and Python Console. The former seems to be a work in progress and the latter has mainly negative reviews saying it's just a vehicle for ads.

It may be that Pythonista is what I'm looking for and it would be a nice excuse to buy an iPad. But I like the idea of Android so I'm still hoping that there is something equivalent for Android.
 

agifford

Ars Tribunus Militum
2,142
Theres also py4a, but its likely less user friendly than your other options.
http://code.google.com/p/python-for-android/ you sideload the apk's for it yourself.

A lot of python is the 3rd party modules, which i doubt work very well if at all on ipad/android. I'd suggest reconsidering a laptop, so you can get a full python environment and access to the full set of modules.
 

allen

Ars Scholae Palatinae
756
Subscriptor
agifford":3g7zqe1m said:
Theres also py4a, but its likely less user friendly than your other options.
http://code.google.com/p/python-for-android/ you sideload the apk's for it yourself.

A lot of python is the 3rd party modules, which i doubt work very well if at all on ipad/android. I'd suggest reconsidering a laptop, so you can get a full python environment and access to the full set of modules.

@agifford, thanks.

I had a quick look at the py4a documentation but it does seem to require a lot of effort even to get started. I could probably figure it put, but I'm not sure that I want to.

Pythonista appears - seen from the outside - to offer quite a lot in the way of third-party modules. In the documentation it says:

Pythonista Modules
The following modules have been created for Pythonista and provide iOS-specific functionality.
canvas — Vector Graphics
clipboard — Copy and paste
console — Functions for working with the text output and keyboard input
editor — Functions for scripting Pythonista’s text editor
keychain — Secure Password Storage
scene — 2D Graphics and Animation
sound — Play simple sounds
...
The following popular third-party modules are also included with Pythonista. They are not part of the Python Standard Library, but they are not specific to iOS.
bs4 — BeautifulSoup 4
Dropbox
feedparser — Universal Feed Parser
Markdown
Python Imaging Library
Requests – HTTP for Humans


Do these work well on the iPad? Perhaps someone in this forum can comment on Pythonista.
 

Stanley Turnteen

Ars Scholae Palatinae
856
Pythonista is fantastic. I use it a ton for processing data on my phone while on the go.

Many of my scripts use a good chunk of the stdlib; the script I'm looking at now uses json, requests, sys, traceback, urlparse, and xmllib. The only caveat is that I'm stuck using the old 'n busted xmllib.XMLParser (which isn't even a new-style class! *boggle*) because the expat library, required for the more modern XML parsing toolsets, isn't included. Based on a couple of posts in the Pythonista forums, I gather that this is due to a compiler/linker issue on iOS and the author is working on it.

The only other issue I've run is using threading, which is fragile since iOS apps aren't allowed to fork child processes (forum discussion here). That's relatively minor though, and can be worked around if you're careful.
 
Status
Not open for further replies.