• JonB

    another possibility is numpy.genfromtext and numpy.recfromcsv, both of which either guess field types and autoconvert, or else let you specify col types. If you are doing any sort of analysis on the data, you want it in a format that numpy can use,

    posted in Pythonista read more
  • JonB

    View.present(style='default', animated=True, popover_location=None, hide_title_bar=False, title_bar_color=None, title_color=None, orientations=None, hide_close_button=False)
    

    If you set the title_bar_color, it will set the status bar color too, if you present full screen. Otherwise, the statusbar color is set by the pythonista color theme.

    posted in Pythonista read more
  • JonB

    "What is stash?" is probably the first question you should have asked :) In this case, the search button produced many threads about the StaSh.
    https://github.com/ywangd/stash

    posted in Pythonista read more
  • JonB

    The photos module might be of some help. You can get an albumn, or all assets, then use delete on an asset to delete it.

    It looks like you can use objc_util for determining if an asset is raw:

    import photos
    from objc_util import *
    for a in photos.get_assets():
       if ObjCInstance(a).isRAW():
          a.delete()
          print('deleted ', a)
    

    There may be less brute force ways (searching a single album, rather than all)

    You shoudl probably test this on something you dont care about, to verify that the raw and jpeg get separate assets....

    posted in Pythonista read more
  • JonB

    change
    with open(path, 'r') as local_fr:
    to
    with open(path, 'rb') as local_fr:

    in two places. files_upload takes bytes, not str, which you get by reading in binary mode, or else encoding.

    posted in Pythonista read more
  • JonB

    https://github.com/dropbox/dropbox-sdk-python/issues/76

    this might be your problem? See link in the link..

    posted in Pythonista read more
  • JonB

    The pyui files created by the ui editor are simple .json files. You can rename the file to json, and see what is inside, or simply open(filename).read(). The json only encodes the non-default parameters, if memory serves.

    You can also open Modules/Python3/site-packages/ui.py to see how these get loaded, but other than some special encoding of colors, mostly this just loads the attribs in the json for each component, then adds a subview to its parent.

    posted in Pythonista read more
  • JonB

    I think you might find this will make your code work, at least it did for me:

    canvas.begin_updates()
    plot()
    canvas.end_updates()

    Unless you are trying to see the individual dots appear one at a time...

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!