• omz

    @cvp Not necessarily, if I remember correctly. I was able to run a script that writes a value to a file, and it did seem to run in the background when launched from the Widget. It's possible that this behavior changed in some iOS update, but I'll check.

    posted in Pythonista read more
  • omz

    @cvp Well, not quite. You can also launch these shortcuts using Spotlight search, and the Shortcuts Today widget, in case you don't want to use Siri.

    posted in Pythonista read more
  • omz

    @mithrendal I see thanks. I'll look into it tomorrow, but I think you might be able to move the main_view creation into the global scope (i.e. out of the main function) to make it work, but it's getting pretty late here, and my iPad is busy, so I can't really test this theory right now. I definitely had a working example (just not very pretty) when I posted the last beta.

    posted in Pythonista read more
  • omz

    Now that there is a Shortcuts module in the Pythonista beta, is there a way to run a shortcut from Pythonista and have it executed without seeing the Shortcuts app open on the screen?

    I don't think that's possible at all. (In case you're wondering: Yes, there's obviously a private framework that does this, but I'm almost certain it would require special, Apple-only entitlements for the app.)

    posted in Pythonista read more
  • omz

    @JonB That's really interesting, but I can't get it to work. file just ignores my custom ~/.magic file (that works when I pass it with the -m flag).

    @dgelessus The #LyX approach seems to be working on Mojave, though I haven't yet tested with the entire library. Thanks!

    posted in Pythonista read more
  • omz

    It looks like my workaround for High Sierra has stopped working on Mojave... Replacing the file utility that Xcode uses doesn't seem entirely trivial, due to System Integrity Protection.

    I still have a Mac with High Sierra to upload builds, but I think I'll have to change my approach pretty soon, and there isn't really much of a point releasing the Py3 template as it is, because it's probably broken for everyone on Mojave…

    If I don't find a better way, I might just package the standard library as a zip file, and unzip it on first launch, but that would require more storage space and also slow down the first launch.

    posted in Pythonista read more
  • omz

    @castro Not yet, sorry, I'm currently working on other things, but it's on my todo list for 3.3.

    posted in Pythonista read more
  • omz

    There isn't a "standardized" way to do this, mostly because there isn't a one-to-one mapping between UIKit views and classes in the ui module.

    I guess you could just walk the view hierarchy until you find a view of the type (e.g. UISwitch) you're interested in though.

    posted in Pythonista read more
  • omz

    @sashk In general, you tap on the (?) button in the console, or on the "Documentation" button in new tabs to get to the documentation. You can then search for shortcuts (or other module names) there.

    posted in Pythonista read more
  • omz

    Looks very nice! 👍 I think you could make this work on other screen sizes relatively easily, by setting the flex attribute for each of the view appropriately, though the timer display might require some manual work in layout.

    posted in General Discussion read more
  • omz

    I apologize for this bug, this is in no way meant to force anyone to upgrade to 3.6, but I'd seriously recommend that you get on board with Python 3 quite soon, as it'll ensure that your code will continue to run without problems in the future.

    I don't think that I'll remove Python 2.7 support from Pythonista in the near future, but a lot of new features require Python 3 already.

    posted in Pythonista read more
  • omz

    @reticulated said:

    @omz are you open to a community contribution?

    Depends. Quite honestly, every additional module/framework I include increases the amount of maintenance I'll have to do later, so it would have to be quite useful for a larger group of people, and I usually add new stuff at my own pace. If you build something truly useful using the Xcode template (I think that's what you're referring to), then of course I'd be open to look at it though.

    posted in Pythonista read more
  • omz

    @coopertino Thanks, I'll look into it. Smart quotes are a pretty annoying feature for Pythonista because it's on by default for everything, so I overlooked a few places where it shouldn't be enabled. You can work around this by disabling smart quotes system-wide, as @JonB suggested, but I think I should disable this for the search/replace fields in any case.

    posted in Pythonista read more
  • omz

    @cvp said:

    Could it be possible to launch such a script by a home screen icon?

    That's not possible, I'm afraid. Home screen icons always launch the full app.

    @sulcud said:

    iPhone XS Max Pythonista keyboard never appears.

    That's weird, did you do a fresh install of the Pythonista beta on the XS Max, or did you restore a backup? Have you tried disabling the 'PyKeys' keyboard, and then enabling it again? Sorry, I don't have a good explanation right now.

    posted in Pythonista read more
  • omz

    @Zimbo If you use Pythonista primarily on the new iPad Pro, I would recommend getting the TestFlight beta, in case you run into problems when using the interactive console. There's a (relatively minor) bug in the App Store version currently (only affects 2018 iPad Pro models). You can get the beta here, if you're interested: https://forum.omz-software.com/topic/5295/new-beta-for-pythonista-3-3

    posted in Pythonista read more
  • omz

    @RomSpy Could you show me a screenshot of those errors?

    posted in Pythonista read more
  • omz

    Pythonista only supports English, and I think that I'll probably keep it this way.

    For one thing, some English skills are basically a requirement for using Python productively anyway. It's just not realistic to translate all the documentation etc. On the other hand, maintaining multiple languages (that I may not speak myself) adds quite a lot of work to every release (not just the initial translation), so it's not really something I want to do, even though I'm not a native speaker myself.

    posted in Pythonista read more
  • omz

    I think this may have to do with whether or not the alpha channel of your image is pre-multiplied or not, but frankly, I don't remember the details off-hand.

    posted in Pythonista read more
  • omz

    Here's a first attempt at a Python 3-based Xcode template: https://www.dropbox.com/s/5l94m0xjbot5je0/Pythonista3AppTemplate.zip?dl=1

    This is roughly equivalent to the current App Store version (not the 3.3 beta), and not final, just something to play around with for people interested in the Xcode template. Let me know if anything's unclear.

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!