@C0deH4cker - See my tool here:
This will let you make an icon for running a particular script in Pythonista when you click it.
Admittedly, this is a bit different than your use case - I'm guessing you want to customize your Pythonista environment every time you start it - which if that's the case, I agree, I'd love that feature.
But if all you want to do is have Pythonista always run a particular thing when you open it, try my solution above.
Actually, i mean a script that gets run whenever you run a script, such as the site module in normal python.
robbielj31 last edited by
I second the background running feature.
tahoma5 last edited by
It would be nice if the editor module could expose the editor settings (at least for read, if not read/write), perhaps presented as a dictionary.
Specifically, at the moment, I'm interested in being able to inspect the 'Tab Width' setting in order to cleanly incorporate a tabify/untabify action script.
Many thanks to you, omz, for building this app and continuing to improve it.
I have a separate script for each that basically just does:
from Macros import function
Except one of them, Spaces To Tabs, is this:
So this might be what youre looking for. If not, I'm sure that this will be helpful to someone.
kamek18 last edited by
I'd love to see kivy on ipad or at least pygame, then pythonista could compete with codea.
@kamek - Unfortunately, because kivy is LGPL, it's very difficult to use it with an iOS app. The way the licensing of LGPL is intended to work, you either need to a.) be able to freely re-link newer/different versions of the LGPL licensed library into your app, or b.) provide the source of your application that uses the library so people can re-compile it themselves.
Obviously, as a private developer, omz is unlikely to be willing to release the source code of Pythonista as it's making him money. This means choice b. is not happening.
As for choice a., iOS apps submitted to the App Store are static applications compiled as a single monolithic executable. There is no ability for a third-party to 're-link' a newer/different version of kivy into such an application without the original .o object files and/or .a static library files (which omz would have to provide - and is again very unlikely).
The only app that I've seen on the iOS App Store claimed to use kivy is ProcessCraft. The other one mentioned (Defletouch) seems to have been removed. And if ProcessCraft is using kivy, they are <b>100% in violation</b> because they don't provide the source / comply with kivy's LGPL license.
As for pygame, that's a really complex library built on several other technologies that would be pretty hard for a single person to port over/adapt to iOS.
My wish list:
Allow scripts to run in the background, even for a limited time
iCloud file sync (I get the Dropbox problem, but iCloud should limit it to just between Pythonista installs on multiple devices) versioning would be nice, but that can be worked around
Settings option for spaces instead of tabs for indents (this has been driving me crazy with errors in the editor and with Gist posts) and/or a Settings option to show whitespace characters in the editor
Scripts will be able to run in the background for up to 10 minutes with the next update. Yes, it is kind of fascinating to open a localhost URL in Mobile Safari ;). This will also enable some other pretty interesting use cases, e.g. scripts that watch the clipboard while you're working in a different app...
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...
Thanks for the update! That will be great to have scripts run in the background, and I understand the file syncing issue. Maybe Apple will relax eventually.
Is there any hope with the spaces vs tabs? I'm still learning Python, but from what I gather, spaces vs tabs is a bit of a hot topic. PEP 8 strongly recommends spaces only for indents in new projects, though there are arguments from both sides. Options would be nice.
I know that tabs-vs-spaces is an issue, especially with pasted code etc. I'm aware of PEP8 but still personally prefer tabs (but I don't want to start a debate here)...
Eventually, there will probably be some sort of setting for this, though I'm not sure about some implementation details yet (e.g. what to do when a file is opened that uses a different tab setting...). I would also have to make some changes to the text rendering (making tabs visible when spaces are selected) so it's really not a trivial feature... To sum it up, this probably won't be in the next update, but it's definitely on my radar and that update won't be the last one. ;)
Thanks again. In the meantime, we can write conversion scripts and, BTW, I will be posting a new project soon that does just that sort of thing.
mcsquaredjr148 last edited by
Thanks for the app, it rocks! I have a small request. It would be nice if multi-line docstrings were properly highlighted in the editor :)
zaphodb227 last edited by
Folders! It would be great to be able to organize all the python scripts in multiple folders. Having all the python scripts cluttered in one big list makes it very unwieldy to work with large, multiple modules.
Also tabbed pane viewing to easily switch between modules.
btw. The app does rock. Great job, thanks.
@omz: I know there is somehow a 10 minute limit in the os, and 10 minutes is fine, but some apps (ie pandora) can run presumably forever in the background. Do you know how it does that?
@C0deH4cker It's because they are playing music, there's an exception for that.
theseus217 last edited by
i would really appreciate numpy or scipy? would be worth some bucks :)
@omz Then add the ability for scripts to play music like that. Then, people could play silence and have it running forever lol.
@C0deH4cker - Unless the primary purpose of your app is music playback, Apple is <b>extremely</b> displeased if you attempt this kind of 'loophole'.
The same goes for the other flags that allow permanent backgrounding: GPS, VoIP, etc.
Good way to get your app immediately yanked / over-analyzed by Apple for any other slight infraction they might not have noticed before.
smkirby229 last edited by
Extraordinary app... Thank you so much for making it! I have some really minor wishes (along with a more major one). I use pythonista mostly at the interactive prompt, and would love an option for the app to open there directly, rather than having to wait for it to load and then swipe across. Also, could you implement a menu for reloading a script as a module into the interpreter (or alternatively executing them)?
The more major one is numpy/scipy/matplotlib. I understand this is probably too big a task though! I wonder if a port of some of matplotlib's basic functionality would be possible using the canvas stuff?