I'm guessing that pure python packages are probably easier to support than ones relying on compiled code. It would be nice if there were some way of supporting user installation of such packages. (If they are a single file, it probably possible now.)
However, for some packages, like numpy and matplotlib that would require significant porting effort, it would probably be difficult to support user installation. Do you think it would be feasible for developer/users who want some of these packages to post binaries or Xcode projects for potential inclusion in future updates?
A final thought: Given that some non-standard packages will take significant effort to port, such effort should be compensated. How about providing them as In-App Purchases? I would gladly pay for a numpy, scipy and matplotlib bundle.
Could you add support for position, accelerometer, magnetometer data along with access to the apple map api?
It would also be great if you could add support for OpenGL ES
Pythonista is the tool that has finally got me into writing Python after years of Perl scripting. It's great to finally have a tool that means I can write useful code directly on my iPad. Thanks
When using an external keyboard within the Python interactive prompt it would be useful if the up arrow key on the keyboard would go back through the command history
Speaking of using keyboards on Pythonista.. A big annoyance for me is typing '''
If you try to type it, you will get ''''''
And if you delete one of the apostrophes, you'll delete two.
The only way to type ''' is to type ' ' which produces '' '' then you add a space to the second one, so you end up with '' ' ' ... then you delete one of the two seperated apostrophes, THEN combine them. Finally you get '''
It really is a pain in the butt for something that I use ALL the time to comment out blocks of code.
I would like to suggest a way to tweak the auto complete features. I understand the usefulness for them when you're typing by hand, but if you invest in a keyboard they really become a problem!
+1 for kivy - x-platform GUI
I wrote a python program for Android using it - with the advantage that I could test it on Linux first. Only the paths differ between the two OSes.
Currently I maintain two versions of my Pythonista programs - the Linux ones use tkinter and the iOS ones use console - which is a bit clunky.
Definitely Scene needs keyboard events support for input.
Hey, I'd like to put in a request for gevent & greenlet; they are really the only modules I find missing in Pythonista. I've manage to cobble up a a script to install any pure-python modules I'd require from zip files or gzip files.
While the iPad is not designed to be a web server but it would be great to be able to test my web server code on the iPad itself, would help a huge community of python web developers escape their desks :)
After my post about kivy I saw pudquick's post about licensing earlier in this thread:
I also looked at what kivy (who also produce the python-for-android environment which I used) said about it:
<blockquote>Kivy is released under the terms of the GNU LGPL Version 3. ... An online version of the license can be found at http://www.gnu.org/licenses/lgpl-3.0.txt
In a nutshell the license allows you to use Kivy in your own projects, regardless of whether they are open source, closed source, commercial or free. The one thing the license does enforce is that if you make changes to the Kivy sourcecode itself, you have to share those changes with us. For a more thorough legal explanation ....
</blockquote>(From http://kivy.org/docs/) Which is not quite the same emphasis - but the licence itself is pretty clear and confirms pudquick's post.
Much seems to depend on static vs dynamic linking - about which I know little. This seems to be summed up here:
<blockquote>Proprietary Source code + LGPL Source code
- statically linked: You must release both parts as LGPL.
- dynamically linked: LGPL code stays LGPL, you can keep the proprietary code proprietary.</blockquote>
(Do iOS apps differ from an Android ones in that respect?)
Could a scripting app, like Pythonista, provide a version of the kivy libraries without itself linking to them? Arguably the scripting app would then not be an 'Application' under the definition in the LGPL. That would put the onus on whoever writes a script using kivy: if that were 'conveyed' they would be subject to the LGPL.
Kivy's python-for-Android may be a special case - they own kivy. But I see that Qpython for Android provides a kivy library and promotes building apps. (I suggest we don't discuss it's licensing here though.)
Would it be possible to install self compiled (i.e. _amodule.so) modules in the Pythonista.app folder and then call them ?
I mean modules compiled in C or ObjectiveC and wrapped to Python with any of the tools available, Swig, Cython, PyRex, F2Py etc.
Agree with eliskan on the double-quote issue.
Apple's rules require that the library is statically linked, so LGPL code is off limits for Pythonista.
The app is fricken awesome, but i do have one request: Could you make the '\r' carriage return character work in the console?
@DaveR - The inability to use dynamically linked code in the iOS App Store is a technological limitation, with legal limitations (in regard to the LGPL) <b>only as a side effect</b>.
The way the App Store DRM works, your copy of any particular app, sold/assigned to your AppleID, has a chunk of the executable encrypted in a method related to your AppleID.
If you attempted to modify an App Store app's executable (somehow) after it was downloaded and installed on your non-jailbroken device, the signature of the app would change and decryption would fail - resulting in the modified app refusing to run. As a result, this cryptographic signing serves as a <b>guarantee</b> of sorts that says: "This app, as it was written when submitted to us, has been approved as SAFE". Tampering with the app invalidates the signature and denies execution.
Since a dynamically linked library makes it very trivial to have parts of your app that you can "swap out" with updated/alternate versions (a main requirement of the LGPL), it just turns into an even larger security headache for Apple's choice of DRM. Either they have to sign every little dynamic library in your app as well - or they can go the route they did and <b>ban it altogether</b>.
You cannot create dynamically linked iOS apps without patching the linker. If you do make one and submit it to Apple, it will be denied for publication on the App Store. In addition, any attempt to trigger a dynamic library load for anything other than iOS-provided system libraries will cause your app to immediately self-terminate.
omz can't do any .so / .dylib loading for you, folks - <b><u>PERIOD</u></b>. And yes, I mean ctypes and all the rest. So stop asking!
The Android ecosystem is a different beast entirely. Since the UI application layer is Dalvik (basically a Java VM), an app doesn't get any hardcore speed unless it links in native code libraries via NDK. Since Dalvik/Java bytecode and native ARM code are two separate beasts, by their very nature they're in separate pieces of the application (wrapped up in an apk bundle, but still separate files inside).
So instead of banning it, they embraced it and did their DRM / licensing in a different fashion. As a result, linked libraries DO exist in the Android realm.
As I don't do Android dev for a living, I can't tell you if "let users load their own .so files" -style applications exist, however.
<b>TL;DR:</b> Please stop bugging omz about including third-party modules, unless they have very small native code components and are liberally (MIT, etc.) licensed. He just can't do it, folks.
@pudquick Thanks for that very full explanation. I'm not a developer these days, but as a Linux user I find these restrictions incredibly frustrating - though I understand the commercial and technical reasons for them. Thanks for your patience.
Two requests, both are pure python modules
Sympy. Symbolic math. And it gets much of the functionality I would normally get from Scipy, even if it is much slower.
Simpy Simulation library. I use this a lot and this would turn my ipad into a serious modeling tool.
@Lluang: SymPy is yet functional in Pythonista. Search for SymPy in Forum.
By the way, one of the last posts by @omz is how to compile SymPy to speed import the module.
@wbwelcomeback If you have a Mac, you can download Xcode and export your Pythonista script. If you want to continue working on your project in Xcode, set include images to all. The only problem is that it's hard to transfer back to Pythonista. If you want to test the Xcode project on a real device (not the simulator), however, you need to sign up for the iOS development program.
omz wrote> As for iCloud sync, I'm pretty sure this wouldn't be approved by Apple; they don't even allow iTunes file sharing for executable code...
This week's update of CBM Hand BASIC added a feature that allows users to bidirectionally sync .bas files via the standard iTunes sync. See: http://cbmhandbasic.blogspot.ch Apple might have let this through because very few folks want to hack Basic these daze. But perhaps Apple is loosening the reigns a bit on their app review process.
@ccc Interesting, could be that it just "slipped through" though. Btw, you can easily do the same with Pythonista by using an app like <a href="http://www.digidna.net/diskaid">DiskAid</a> or <a href="http://ecamm.com/mac/phoneview/">PhoneView</a>.
OpenCV (Open Source Computer Vision) has an iOS version. OpenCV also has Python bindings. This would not only provide image and video processing, but the core module provides some basic array and matrix operations that could be useful elsewhere. Just a thought...
I'd like to be able to add my own code templates. I imagine it extending the list of options you see when you press + to create a new file (Scene with Layers, Basic Scene, Empty) much like you can extend the Actions menu.