Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Feature Requests
-
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).
http://developer.android.com/tools/sdk/ndk/index.html
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.
http://omz-software.com/pythonista/forums/discussion/262/import-takes-way-too-long#Item_4
-
@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.
-
Custom modules anyone?
-
Creating your own modules "just works" in Pythonista. Or were you looking for something else??
To see a module in action, check out: bashedcrab's Hydrogen GUI Framework for Pythonista...
Hydrogen.py is a module -- running it does nothing
HydrogenDemo.py is a script/app/program -- running it imports Hydrogen to create a GUI that the user can play with.http://omz-forums.appspot.com/pythonista/post/5003825878401024
-
Now, how am I suppost to add this to the python library, or using another method, to be able to import this example module?
-
The first line of code in HydrogenDemo.py is:
from Hydrogen import *
Which imports all the code of Hydrogen.py into HydrogenDemo.py.
-
I support mspriggs opinion to have OpenGL support...
Although I think it can be real challenge, since it seems the ES bindings may not be very mature.http://raspberrypi.stackexchange.com/questions/4852/how-to-use-opengl-es-through-python
https://github.com/peterderivaz/pyopengles
http://pyopengl.sourceforge.net/
IMHO, I think this might boost Pythonista popularity, even more.
-
I propose adding playing several sequential sounds (like piano notes) as an "animation". If you play several notes in a row doing:
notes = 'C3', 'D3', 'E3', 'C3'
for note in notes:
sound.play_effect('Piano_' + note)
time.sleep(0.5)even though sound.play_effect is asynchronous and returns immediately, because the notes are played in a for loop, draw doesn't get called until the sounds are all done. The "to_value" in animate would be a sequence of sounds (not just piano notes). In draw (or perhaps "play"), you would do the same "layer.update(dt)" and "layer.draw" (or "layer.play").
This could be implemented using only Python (make a queue of sounds to play, check if a sound is done, and if so, play the next one), but having this as a built-in "animation" would be nice.
Another nice thing would be being able to add your own sounds to the sound library.
-
Hi Ole,
I'd appreciate the option for partial screen rendering in the scene module. So I can start with the previous frame buffer, and only update/change the areas I need rather than having to redraw the entire scene.I've started on a branch for Hydrogen that implements a "dirty-region" algorithm to only redraw the areas of screen that need it. However I end up with a black screen and only the newly redrawn areas indicating I'm getting a completely new framebuffer, and I can't see a way to preserve the previously drawn scene.
-
Hi there
Pyhtonista is great! I love it!
The only 2 things that are not working, even though they have been mentioned before, are:
- tab size in iOS7 not working at all
- auto complete for single and double quotes for when you have an external keyboard. It just doesn't work properly.
Thanks
-
UPDATE: The tabs issue was fixed quite elegantly with the soft tabs feature of Pythonista v1.4.
Instead of tabs, you could use 4 spaces. Python PEP 8 states that spaces are Python's preferred indentation method instead of tabs. Bulk conversion tabs to 4 spaces is a simple process in Pythonista.