• halloleooo

    I have the same problem. I use the Logitech Smart Folio Keyboard with an iPad and have the same weird issue!

    No idea though how to fix it..

    posted in Pythonista read more
  • halloleooo

    @cvp @ccc Funny, funny., but a good point: These days everything is semiconductors...

    In regards to the problem at hand: Using the file systems means I have to create a tmpdir first I guess - or where the heck does the stuff get saved when Pythonista executes in a share extension???

    posted in Pythonista read more
  • halloleooo

    Thanks for the details. I was hoping to be able to tweak dialogs.share)image to export JPGs, but the detour via a JPG file is ok too.

    Thanks again!

    posted in Pythonista read more
  • halloleooo

    Thanks @cvp.

    Does this mean I have save the PIL image first as a JPG to disk and then I can share it?

    posted in Pythonista read more
  • halloleooo

    I use dialogs.share_image(img) to share an photo from Pythonista to other apps.

    The photo is given as a PiL image and it seems to be shared as a PNG which is pretty inefficient for photos.

    Any idea how I can share the photo as a JPEG?

    posted in Pythonista read more
  • halloleooo

    @cvp Yes, I noticed , because I got “AttributeError: '_ui.Image' object has no attribute 'format'”.

    I’ll try your new suggestion. Thanks!

    posted in Pythonista read more
  • halloleooo

    A new chapter with my Image Share Extension:

    I started using appex.get_attachments instead of appex.get_images, because with get attachments I get the path name and thus can check for HEIC images with the same name as JPGs. This is great for the Photos app.

    However in the Files app I get via get_attachments duplicates for the same file path! get_images(image_tyepe='ui') still gives me only single files.

    Here some debug output with two files selected in the Files app when calling the Share Extension.

    get_attachments list:
      /private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Journals/Diary/_assets/Aubergine-menu_MAR2021_Julia.jpg
      /private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Journals/Diary/_assets/Aubergine-menu_MAR2021_Julia.jpg
      /private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Journals/Diary/_assets/Aubergine-menu_MAR2021_Leo.jpg
      /private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Journals/Diary/_assets/Aubergine-menu_MAR2021_Leo.jpg
      
    get_images list
      <_ui.Image object at 0x1162F7240>
      <_ui.Image object  at 0x1162F7550>
    

    So I clearly prefer using get_images! But then I do not know the name and extension of the underlying file (for the HEIC deduping). - Any way to get this?

    Many thanks for pointers in advance!

    posted in Pythonista read more
  • halloleooo

    @cvp Totally agree. Would be sooo good to be able to reach out to omz...

    posted in Pythonista read more
  • halloleooo

    @ts said:

    ...view.wait_modal...

    Aha! wait_modal Seems to be the trick! Cool!

    posted in Pythonista read more
  • halloleooo

    @cvp said::

    Maybe reinstall Pythonista?

    Always afraid to lose my data

    Fair enough, but the Python files you should be able to get back via iCloud if you stored them there.

    Of course all custom links you’ve put into the Wrench sheet, you’d need to rewire...

    posted in Pythonista read more
  • halloleooo

    @cvp Thanks. Makes sense. I was hoping there is a way via the UI builder, but of course, I can adjust things later in code.

    posted in Pythonista read more
  • halloleooo

    @cvp Only when you use os.rename. If you use pathlib's Path.rename I think it silently overwrites the old backup file.

    posted in Pythonista read more
  • halloleooo

    @Cvp And maybe making Ole Zorn aware of it? Not sure how responsive he is on Twitter...

    posted in Pythonista read more
  • halloleooo

    @cvp No idea what can cause this. Maybe reinstall Pythonista?

    posted in Pythonista read more
  • halloleooo

    I have my well-working Image Joiner share extension developed with a *.pyui file. This extension works well on my iPad I use for developing the UI:

    However when running on my iPhone it looks like this:

    Not too bad, but if I want to have a design which shows the percent" SegementControl next to its "Border Width" Label on iPad and iPhone_, how can I design the .pyui file for it?

    posted in Pythonista read more
  • halloleooo

    In a situation like this I would never write to the same file I read from.:

    1. read from the config file.
    2. Write to a new file.
    3. Rename the old config file to something like ..._bak.yml.
    4. Rename the new file to the name of the old config file.

    My 2cts.

    posted in Pythonista read more
  • halloleooo

    @cvp When does this happen for you? All the time? Or only when you open the Pyhtonista Share Sheet in Pythonista?

    When I open the Pythonista Share Sheet, say, in Photos.app, I get only the appex scripts.

    posted in Pythonista read more
  • halloleooo

    @cvp Ups, yes, of course! 😉

    posted in Pythonista read more
  • halloleooo

    Is Pythonista able to be used to convert this to an iOS app?

    Depends on what you mean with "convert this to an iOS app". You should be able to run the bot under Pythonista. But it won't be its own iOS app. The bot will run inside the Pythonista app.

    How does pythonista handle command line type parameters and sqlite3 storage?

    I don't know about SQLite, but you can certainly give scripts you run under Pythonista command line arguments on run.

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!