Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The developer of Python for iOS, Jonathan Hosmer, mentions that he is prevented by App store policy to provide the functionality of importing external sources into the app.

http://news.ycombinator.com/item?id=3633968

However, another HN user found a clever workaround using python's builtin exec and urlib:

http://news.ycombinator.com/item?id=3634837 http://myblog.rsynnott.com/2012/02/fun-with-python-for-ios.h...



My name is in the credits for Python for iOS as I provided the pure python patches for urllib to even work in the first place :)

There is also a link in the credits next to my name for my github repo which contains the original patches, plus some new code I just uploaded (shpy - a pure python shell-alike, with bash-like file name globbing and file download + unzip)

https://github.com/pudquick/PythonForiOSPatches

I also was involved in working with the requests/urllib3 maintainers to get these modules working in Python for iOS, as it didn't originally ship with ssl support.

My original patches could self-install with a simple one-liner copy&paste, which then gave you the '_rp' module (now included in the app).

I will add a similar one-liner for the installation of shpy (and better documentation) but should you get it installed, operation is as follows:

from shpy import *

shpy()

Currently there is a bug with raw_input where the prompt is printing after text has been entered, so I'm working around that right now.

I also plan on adding untar support, PyPI pure python module installation, and WebDAV.

If you have questions, let me know.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: