• @ihf said:

    However, I came up with a different problem there. I was running v.13 and the script asks to update to v1.17. It then say V1.17 has been installed and I then close nd restrat the program but it does the same thing again

    Is it possible that outline.py was edited in Pythonista when you ran it?

  • Thank you ccc for your reply and links. Unfortunately they don't address my problem which is to use MIDO to capture a performance from a digital piano in MIDI format and eventually convert it into a score. My question was specifically about MIDO, i e. why it does not work in Pythonista and is there someone that has had success with it and could throw some light into the problem.

  • You can install other packages with pip.
    There is a Pythonista shell called Stash that supports pip.


    Developing with Pythonista on my iPhone 12 mini is a pain. With an iPad, it is fun. Sometimes the Keyboard Layout does switch on my iPad all of a sudden so you don’t see the undo button anymore.

    In that case you can (as far as I know) only reload the document and then the Keyboard looks normal again.

    You also have to be a little creative when importing and exporting files, i.e. from iCloud and back. You need to change the file type of some files (i.e. .pyui, .ttf) to .txt with Pythonista or Goodreader in order to be able to copy them. If you don’t do this they are greyed out when trying to export or import with Pythonista App. Once imported, you can change the filetype back to what it was with Pythonista App.

    There are no other things annoying me. Buying Pythonista was one of my best decisions.

  • @gheharukoh7 I don't know in Pythonista but ios standard app Shortcuts allows you to define a set of actions which is automatically executed when your device connects to a (new) wifi network.
    You could get the date/time and store it in a file..., or compute the delta from previous time.

  • Just downloaded today and having syncing issues. Nothing is syncing between iPhone and iPad. Both iOS 15. Like previously mentioned, if I name a folder the same as name of file created on other device, it amends with ‘1’. So it does seem it is aware of the file but that’s as far as it goes. Off to bed now. Let’s see if it’s synced by the morning. Shame this is still happening two year after it’s been highlighted.

  • Cheers everyone, Jon that’s where I nabbed that snippet from in first place! The issue is the proximity to the edge of the image I think, mine were very close to the edge so I tried a bigger black border and I did try messing with the numbers a bit on properties.Seems to work better but still not perfect.

  • @ROSELJR create you .html file and a .py file presenting your html

  • Aiohttp uses the default device cacert. Which might be old (this might be the hard coded one that came with pythonista, I forget if it uses actual device cacerts)

    Aiohttp can be set to a different ssl context -- session.get() takes an ssl argument.

    context = ssl.create_default_context(cafile=certifi.where()) ... session = aiohttp.ClientSession() session.get(url, ssl=context)

    I think you can also pass ssl_context to a TCPConnector, so it gets used to all requests:

    conn = aiohttp.TCPConnector(ssl_context=ssl_context) session = aiohttp.ClientSession(connector=conn)
  • @JonB @cvp, I have tried a few attempts to contact the couple of support email addresses we have for Pythonista, but there's no response. My guess is it is @omz alone handling anything that comes in there.

    Anyway, I think we should continue to work on finding a way to get in contact, though in no way do I wish to put undue pressure on Ole, or come across as pushy or rude. I just want to get a conversation started.

  • @810D 👍 and welcome in this marvelous forum of a marvelous app

  • @JonB it's very very slow

    To the point it's not practical for projects with big dependencies.

    So far, combo of Raspberry Pi, Blink Shell is best iPad-based platform for me; editing on Pythonista and using Working Copy where possible.

  • @JonB additional info: if I close the traceback, Pythonista hangs. If I remove it from memory, wait some time and restart it, the Pythonista startup hangs with a black screen until I power off my iPad.
    And no ObjectiveC log, nor @dgelessus faut_log.

    Édit: same problem without any run of any script, weird. Even if started from safari or with safe mode setting.

  • @jeremiah.helfer I think you are trying to subclass shapenode, not rect. Rect does not do anything in Scene.

  • https://pyobjc.readthedocs.io Especially the examples.

  • @WyldKard I'm not sure it did work before iOS 15 because we are a lot to use

    url = pythonista3://myfolder/myscript.py?action=run
    open url

    instead of run script due to the problem that run script did not accept argument from years.

  • @sgspecker This allows to create a new photo with updated caption in camera roll if you share an existing photo which has already a caption

    import appex import console import os import photos def main(): if appex.is_running_extension(): fil = appex.get_attachments()[0] else: fil = 'a.jpg' with open(fil, mode='rb') as fin: b = fin.read() #b'\xff\xed\xllllPhotoshop 3.0\x00' = marker APP1 # ----- #b'8BIM\x04\x04\x00\x00\x00\x00\x00\x17\x1c\x01Z\x00\x03\x1b%G\x1c\x02\x0\x0\x02 # --- #b'\x00\x02\x1c\x02x\x00\x03Cap\x00 ip = b.find(b'Photoshop') if ip >= 0: #print(b[ip-6:ip+100]) lip = int.from_bytes(b[ip-2:ip], "big") i8 = b.find(b'8BIM',ip) if i8 >= 0: l8 = int.from_bytes(b[i8+10:i8+12], "big") i = b.find(b'\x1c\x02x', i8) # caption field identified by x'1c0278' then length in 2 bytes x'0005' = 5 l = int.from_bytes(b[i+3:i+5], "big") caption = b[i+5:i+5+l].decode("utf-8") #print(caption) #return # if no update # caption = console.input_alert('new caption?','', caption, 'ok', hide_cancel_button=True) lu = len(caption) bl = lu.to_bytes(2,'big') # x'000l' # store new caption b = b[:i+3] + bl + caption.encode('utf-8') + b[i+5+l:] # change length of 8BIM marker l8aft = l8 - l + lu bl8aft = l8aft.to_bytes(2,'big') # x'000l' b = b[:i8+10] + bl8aft + b[i8+12:] # change length of Photoshop marker at ip-2 lipaft = lip - l + lu blaft = lipaft.to_bytes(2,'big') # x'000l' b = b[:ip-2] + blaft + b[ip:] tmp = '_temp.jpg' with open(tmp, mode='wb') as fout: fout.write(b) asset = photos.create_image_asset(tmp) os.remove(tmp) appex.finish() if __name__ == '__main__': main()
Internal error.

Oops! Looks like something went wrong!