• Walter

    It would be nice to hear something about the planned functionality in a next version of Pythonista and also when we might expect such an update. I think we all agree this is an awesome app with tons of functionality, but iOS and Python are developing rapidly (some modules / frameworks in Pythonista really need updating) and it would be nice to know that Pythonista will keep up with this. This is an app for which I would gladly pay for each update, by the way, since it's one of those apps that really stands out and makes a difference. I hope omz decides to share some of his plans / ideas for Pythonista.

    posted in Pythonista read more
  • Walter

    Hi, I also need pandas and scipy on my iPad (and really, really hope that they'll be available in Pythonista one day), so I decided to try the Analyser app (despite the price). My advice: don't waste your money on this app, it's a total rip-off. Its UI is a mix of English, Chinese and empty labels which appear to be randomly placed on the screen and the embedded editor is a joke. I filed a complaint at Apple Support and was able to get my money back, so I just wanted to warn you not to buy this app.

    For the moment I'm using Microsoft Azure Notebooks when I need pandas and scipy, works great. But I would welcome an offline solution someday, preferably in Pythonista ofcourse :-)

    posted in Pythonista read more
  • Walter

    So this is what I'm using to get the start date and end date of any album, works great and takes advantage of the fact that the assets list is ordered in ascending order by date:

    def get_album_dates(album:photos.AssetCollection) -> (datetime.datetime, datetime.datetime):
        assets = album.assets
        if len(assets) == 0:
            return (None, None)
        else:
            return (assets[0].creation_date, assets[-1].creation_date)
    

    posted in Pythonista read more
  • Walter

    @omz Thanks for your answer, good to know. Using the assets list of a regular or smart album in combination with the creation_date of an asset it's easy to get the start date and end date of any album: for moments there's also the other alternative.

    posted in Pythonista read more
  • Walter

    The updated photos-module in the new Pythonista versions is great, but I wonder about the start and end date you can now retrieve for an album (regular, smart, moments). I notice that I only get valid dates back for moments, not for regular albums or smart albums: in the latter two cases the return value is None. Is this by design (I know Apple's API works the same way) or is this a small glitch in Pythonista's implementation?

    posted in Pythonista read more
  • Walter

    @omz In Swift I also didn't find a way to get the correct localization of album names, not in Xcode but also not on a device. The latter has always surprised me, because you would expect to get the correct locale there. Sometimes an API has a will of its own, it appears. I'm really looking forward to Pythonista 3, by the way.

    posted in Pythonista read more
  • Walter

    @dgelessus Hi, cool that this functionality will be available in Pythonista 3. I haven't signed up for the beta (yet), I'm still very busy with the current version and everything that's possible with it. I don't know whether Pythonista 2 will be updated with iOS modules with extended functionality, but in any case I'm learning a lot by trying to get this Photos functionality to work. Great fun :-)

    Interesting that you mention that the docs for the beta say that album names are potentially localized: apparently there really is something funny going on in Apple's Photos API then.

    posted in Pythonista read more
  • Walter

    I have been playing around with the objc_util module in order to retrieve information about the various photo albums that are defined in the Photos app. These include user albums and smart albums. Properties I'd like to know about these albums are the localized name, the type (shared, smart, regular) and things like the number of photos and videos and the earliest and latest dates of items in an album. The link below shows a module with my results so far:

    https://gist.github.com/44f6a49ac858a0cb0917c3dbb79e1c79

    Basically all the functionality I mentioned is present and can be used by calling the appropriate functions. The only funky thing I encountered was the fact the the localizedTitle property of a smart album only returns the English version of the album title, not the Dutch one (which I'm interested in): hence the presence of the two functions with __localized in their name, in which I determine the Dutch name of the smart albums. I don't like this setup (not very flexible for other languages than Dutch), but for the moment this is what I came up with.

    Next step of course is getting the photos in the albums, but first things first. Besides, I've seen some examples of this, so those will come in handy :-)

    I've relatively new to Python, so comments / improvements are very welcome. Thanks!

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!