Welcome to the Pythonista Community Forums!

Pythonista is a Python programming environment for iOS. To learn more, head over to the Pythonista Website.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter
Feature Requests
  • 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.
  • I also would gladly pay extra for port work.
  • I'd really like numpy, and I'd pay too.
  • So far, I want:

    - registration as a Mail export target for .py files;
    - an iPython-based interactive console;
    - pygame.


    -- Tahoma
  • To be honest, I haven't had much luck with porting numpy (matplotlib also relies on that). Parts of it are written in Fortran and it's overall *very* low-level and hard to port. I'm not saying it's impossible per se, maybe I'm just not smart enough...

    Installing pure Python modules is usually relatively easy to do with a script – as an example, here's a quick-and-dirty script that installs the cloudfiles module (for RackSpace): https://gist.github.com/9c54a36c619261067225

    I cannot add anything that downloads code to the app itself – that includes things like being able to open .py files. Apple would reject it and they have actually requested (i.e. enforced) removal of similar features in other apps. There's a rule in the App Store review guidelines that forbids downloading/installing executable code and they have a pretty broad definition of "downloading".
  • Have you looked at kivy? http://kivy.org/

    It's a cross-platform, open source GUI for python that has been port to iOS.
  • Certainly looks interesting, the LGPL license could be problematic though.
  • They claim "Kivy is 100% free to use, under LGPL 3 licence. The toolkit is professionally developed, backed and used. You can use it in a product and sell your product."

    There are two apps in the App Store using kivy, one is free (http://itunes.apple.com/us/app/deflectouch/id505729681) and one is $75 (http://itunes.apple.com/us/app/processcraft/id526377075).

    However, I'd be the last one to ask about what any particular license allows or not.

    Another GUI I came across is PyUI (http://pyui.sourceforge.net), which has an option of rendering using PyOpenGL and PIL.
  • The one feature I would really like is for my scripts to sync between my iPhone and iPad via iCloud. I think that would make development a lot more convenient as I like to switch between both devices for different types of tasks.
  • You could use the Dropbox code posted here to sync your devices:
    http://omz-software.com/pythonista/forums/discussion/10/using-the-dropbox-module#Item_5

    You would have to start the sync manually, however.

    For my part, I would rather want support for a version control system. The currently available methods to up/download to gist are a start.
  • @oefe: Unfortunately that kind of feature is the thing that tends to keep code interpreters out of the App Store. As long as the app doesn't directly ship with the ability to both execute interpreted code and load code from an internet-based source, it's generally OK.

    I've heard this complaint from many different interpreter makers on the store - exporting to the internet is almost always ok, but being able to pull in code from an arbitrary location with an account / URL is generally a "no-no" feature to have enabled when publishing to the store.
  • Perhaps it is possible to use either Mercurial or Codeville from within Pythonista since they are written in Python?
  • Sounds doable. A small part of hg is written in C for performance reasons, but there is apparently a pure Python option. I think we can live withbthe performance hit of the pure python version. After all, we few of us will have Gigabyte sized repositories any time soon.
  • I personally would love to see a simple WebKit- console viewer.. Set stdout to a WebKit browser. Form submits and page requests sent back as stdin... Then we could leverage pythonista as a "server-side" scripting language with an HTML5 FE... Robust UI elements to compliment the graphics set already available.
  • Dear all

    I was going to post a thread regarding "Feature Requests" in which all of the requested features could be included by members. Just description of them and not any commenting or debate, etc. so that just with a glance one can understand what items are mostly required.

    But I am just a newbie and I want to know ur ideas about it. Do you think it is a good idea?

  • @rhithyn - You can already do that. If you use the modal parameter on the webbrowser class, it can run non-blocking in a different thread - leaving you free to run python code in the background to serve it up.

    I've got several bits of code I'm working on right now that run python as the "server-side" code with the browser as the UI. Works great.
  • How about ubiquitous round-rects? Or at least some kind of ability to specify border radii on drawn rects?
  • I'd love to have NumPy in Pythonista.

    Small feature requests:
    - It would be nice if there was an option "Select line" when you touch the text cursor.
    - How about horizontally swiping on the text view would move the cursor?
  • @rroobblinn You can tap with two fingers to select a line.
  • Meshes?
    Is it possible to get meshes in Pythonista. If we could how long would it take @omz
  • I don't know if this is difficult or not, but a way to pause and stop a sound.
    That would help me because I just started making a simple music player.
  • The definitions in a script (classes, global variables) should be reflected in the intactive interpreter when we run the script, this would make the interactive interpreter much more useful.
  • I'd like a facility to 'lock' a script. It's easy to accidentally hit a key and introduce an error when all I intended was to run it.

    The ability to run the script from the library without going into the code editor would be useful too.
  • PLEASE support multiline strings! I use them as docstrings, but in the current version of Pythonista, the syntax highlighter balks at multiline strings, and the editor will suggest random words from within the string when I'm typing code.
  • Id love to see a way for a script to be run on startup.
  • @C0deH4cker - See my tool here:

    http://omz-software.com/pythonista/forums/discussion/64/create-pythonista-webclips-directly-from-pythonista

    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.
  • It would be really cool if it was possible (configurable?) to keep a script running in the background. Is that possible?
  • I second the background running feature.
  • With some of the more complicated feature requests like Numpy, I wonder if it might be best to try to get the help of the module maintainers and community to write code for the ios, that can be used by the community, and implemented into specific apps.

    Is that a reasonable solution, to increasing the number of modules without making the work load skyrocket? If the entire community contributed to Python that works on the iOs, then you could focus on some of the modules that are iOs specific. What would they need to know to provide modules useful for the iOs?
  • 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.
  • @tahoma
    I made this Macros.py script that I use for Pythonista. Maybe this will be helpful to you:
    https://gist.github.com/3ae7811f06caabba80c9

    I have a separate script for each that basically just does:

    from Macros import function

    function()



    Except one of them, Spaces To Tabs, is this:
    https://gist.github.com/60088a8513acaa99fd59


    So this might be what youre looking for. If not, I'm sure that this will be helpful to someone.
  • 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 100% in violation 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.
  • 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 :)
  • 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.
  • Awesome that scripts will be able to run in the background. This basically makes it possible to develop a complete web application in Python. Very cool.
    I was thinking of a pet project with a Python backend and an AngularJS frontend. This would basically make it possible to develop the server component in Pythonista and do the client component in Textastic and being able to test. Awesome! :-)

    And furthermore +1 for the folders thing, it would really help clean up things. It would actually be nice to have Project folders where you can see more than just the Python files, but also generated files or configuration files, together with a simple text editor (just plain text where you could edit config files for instance) next to the Python one...
  • @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.
  • hi,

    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 extremely 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.
  • Another nice to have would be to (with a setting for those who want it/need it ?) remove the keyboard bar with the numbers and the brackets that you also see when using an external keyboard. I'm mostly using an Apple Wireless Keyboard when using Pythonista and it could gain a few extra lines if that bar was removed.

    This bar just to be clear: https://www.dropbox.com/s/t563jr5idjb7rji/2013-01-07 20.32.37.png
  • No I need that bar, only if you make it switchable, omz,
    In pythonista tabs work nice, because of saving space ...
    And there are already replace facilities suggested in this forum ... If you need to or export , change and import a file ;-)

  • 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?
  • Yeah I would like to see matplotlib included into Pythonista in the future. I've used it plenty in the past and it was very nifty.

    Access to more of the iPad/iPhone's camera, mic, GPS services, etc would also be nice.

    Finally I would LOVE to see a free Pythonista app that lets people run codes that are submitted onto a server from -paid- app subscribers. So if I bought the app, I could upload my projects and someone who has the free app could then view the app in their free version. I'm not sure this is possible due to Apple's store limitations. But something along these lines would be great.

    Keep up the good work! I can't wait for my Logitech keyboard so I can really utilize this app to it's potential (that touch screen kills)