• mikael

    @jmv38, latest version no longer has the f-strings, so should be compatible with Python 3.5 and the App Store version of Pythonista.

    posted in Pythonista read more
  • mikael

    @jmv38, my bad, I forgot to mention that this is Python 3.6 code, only available in Pythonista beta at the moment.

    posted in Pythonista read more
  • mikael

    I have been told that you should not generate documentation from code, and there are probably several good reasons behind that guideline. However, for the specific purpose of documenting and testing the small-scale projects I have using Pythonista, I really prefer maintaining only the docstrings that are in the code, and then generating the markdown documentation for Github.

    docgen is a single-file utility that is intended to be run from the Pythonista action menu. Check the README file for usage.

    For "real-life" examples of the generated documentation, see the Scripter and Gestures docs.

    posted in Pythonista read more
  • mikael

    @zrzka, just curious, did you progress with this? And if not, was it due to some problems or just other more important things taking up your bandwidth?

    posted in Pythonista read more
  • mikael

    My wife needed a presentation timer for an event, to replace pieces of paper with numbers on them to show the speakers how much time they have left.

    I thought, ok, the standard iOS timer should do the trick, and if not, there must be tons of apps like that.

    Sure enough, there are apps, but none of them were simple or clear enough. Some had too small numbers to be visible meters away, some funny color schemes, some funny graphics, some counted the wrong way. Even the best ones had seconds ticking away - my wife asked "why would the speakers need to see the seconds?", and I had to admit that she was quite right, even the seconds are surplus to requirements here.

    So in the end I took out Pythonista and spent 15 minutes writing an app of under 100 lines that just shows the minutes, with an unobtrusive black bar at the bottom of the screen showing the seconds ticking away, mainly so that the user knows that something is happening, and a starting time that is adjustable by sliding a finger up or down on the screen. Accessible via home screen shortcut, it was simple enough and served its purpose at a large event.

    The main thing I wanted to say here is "yay Pythonista!" - once again.

    Here's a gist for the code. Note that it needs the beta at the moment.

    posted in Pythonista read more
  • mikael

    @zrzka, thanks.

    Again, just to be sure, I checked the property and got True on my 6S+.

    Would be nice if someone could run the gist from the previous post, maybe on a newer device, just to check that the results are similar.

    posted in Pythonista read more
  • mikael

    @omz, just checking: for ARKit to really work in Pythonista, would Pythonista need to include the arkit key in plist or somesuch?

    posted in Pythonista read more
  • mikael

    @JonB, allright! So, by changing the MyARView __init__ to initialize and only calling it after present:

    v = MyARView()
    v.present('full_screen', hide_title_bar=True)
    v.initialize()
    

    ... we can follow the right order, using the "forbidden" nextResponder trick:

    self_objc.nextResponder().addChildViewController_(cvc)
    self_objc.addSubview_(sceneview)
    cvc.didMoveToParentViewController_(self_objc)
    

    ... after which CustomViewController_viewWillAppear_ no longer needs to be called manually, i.e. things work as they should.

    (Here's a gist with this version of the code.)

    But still, debug info does not appear, nor does the cube stay anchored to the surroundings.

    posted in Pythonista read more
  • mikael

    @Brun0oO, both @JonB and @zrzka have replied on this thread, and neither pointed out anything obvious wrong with your code, so we are out of luck. :-) Unless @omz dips in, but I think he is too busy with the next release of Pythonista to spend time on the fun stuff.

    posted in Pythonista read more
  • mikael

    @JonB, is it not already on main thread, since the call to main is decorated?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!