omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. mithrendal

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 1
    • Followers 0
    • Topics 2
    • Posts 47
    • Best 9
    • Controversial 0
    • Groups 0

    mithrendal

    @mithrendal

    9
    Reputation
    1383
    Profile views
    47
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    mithrendal Unfollow Follow

    Best posts made by mithrendal

    • RE: New Beta for Pythonista 3.3

      @Blanchot So true.

      @mikael your new job colleagues will be very happy as they get a high skilled and very talented work mate with you!!! Wish you a happy time on your new journey.

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: No update?

      Hello Ole,
      I am back on the app store version again. Why not just release the last beta to the app store? It was pretty stable. Come on don't be shy and just push the button !

      ;-)

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: Critique my async

      I like the intuitive and simplistic API approach as always when mikael comes out with a new thing ;-) Next time I have a need for parallel execution in my code I will definitly come back to genr ...

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: Beta expires in 1 day

      the beta expired. I did not delete it ! I just reinstalled the old appstore version. After the download completed, now pythonista starts again. All my data was still there.

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: Pythonista on the iPad

      Hi @Lacajenne
      Is it one of the new iPads Pros with bigger screens ? When I remember correctly the current version on the app store is not so compatible with the new screen sizes from the new iPads. A new beta version is already available since late december which fixes this. You could download it, just watch out for the thread about the new Pythonista 3.3 BETA or you have to wait and have a bit patience it should be out sometime soon.

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: Something like „while view.is_open“ possible?

      you could setup a custom view and overwrite the will_close method, maybe you also like to know when the view is fully loaded...

      I have copied the appropiate code from the docs http://omz-software.com/pythonista/docs/ios/ui.html for you

      import ui
      
      class MyView (ui.View):
          def did_load(self):
              # This will be called when a view has been fully loaded from a UI file.
              pass
      
          def will_close(self):
              # This will be called when a presented view is about to be dismissed.
              # You might want to save data here.
              pass
      
      posted in Pythonista
      mithrendal
      mithrendal
    • RE: Lan game communication?

      @ccc the last line does not close the server socket itself. It only closes the just accepted connection. The client also closes immediately after sending "some data". So no reason to not close the connection on server side.

      Anyway @bennr01 did only write this as some short demonstration ... In real world you would probably hold the connection open over the whole game session ....

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: How to Support Multipeer Connectivity ?

      Hi @mikael,

      Yes that looks promising. I just uploaded my work on this for you at github. It doesn't crash and is completely reentrant. The idea was to make an simple API which games and other apps can import. But I did not work on it recently. When I saw your post that you too want to build an API I thought you might want to have a look. https://github.com/mithrendal/pythonista_mpc

      Btw I am a big fan of your Gestures.py API 😀

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: How to Support Multipeer Connectivity ?

      Hi Mikael,

      had the same problem. The crash was caused by the garbage collection which is triggered automatically somewhen when python wants to delete the invitationHandler.

      My approach/workaround was not to get it deleted by remembering its reference. That way the garbage collector will not call delete on it.

      instead of

      blk.invoke(ObjCInstance(invitationHandler),True, ObjCInstance(mySession))

      try

      inviHandler = ObjCInstance(invitationHandler)
      someglobalscopeobject.remember_this_thing=inviHandler
      blk.invoke(inviHandler,True, ObjCInstance(mySession))

      my guess was that something in the MPC framework still holds the reference and uses this invitation handler but the pythonista garbage collector does not know this because it only knows about references in your python programm. Thus when the python gc deletes it, and after that something in the apple mpc framework wants to call it, it will inevitably crash.

      EDIT:
      instead of someglobalscopedobject you could also use something like that to make it able to be reentrant

      import builtins

      ...
      inviHandlerObj = ObjCInstance(invitationHandler)

      if (builtins.retainCache == NONE):
         builtins.retainCache = [ ]
      builtins.retainCache.append(inviHandlerObj)

      blk.invoke(inviHandlerObj,True, ObjCInstance(mySession))
      ...

      posted in Pythonista
      mithrendal
      mithrendal

    Latest posts made by mithrendal

    • RE: New Beta for Pythonista 3.3

      @Blanchot So true.

      @mikael your new job colleagues will be very happy as they get a high skilled and very talented work mate with you!!! Wish you a happy time on your new journey.

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: No update?

      Hello Ole,
      I am back on the app store version again. Why not just release the last beta to the app store? It was pretty stable. Come on don't be shy and just push the button !

      ;-)

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: Critique my async

      I like the intuitive and simplistic API approach as always when mikael comes out with a new thing ;-) Next time I have a need for parallel execution in my code I will definitly come back to genr ...

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: 330018: contacts example is broken...

      I understand that seems plausible. Then we have got this bug because @omz built the 330018 with a new version of XCode ... Do you think he should apply for an exception to the rule as pointed out in your linked article then ? Maybe Apple won't give him and us this exception...

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: 330018: contacts example is broken...

      the official example still works with the 330015 and with the appstore version on iOS13.2. Therefore definitly a new problem introduced with 330018.

      posted in Pythonista
      mithrendal
      mithrendal
    • 330018: contacts example is broken...

      the example from the official documentation http://omz-software.com/pythonista/docs/ios/contacts.html
      does not work anymore in this build. It just stops on line 6 without an error.

      The problem is the access to the "note" property.

      import contacts
      print('Address Book Notes')
      print('=' * 40)
      people = contacts.get_all_people()
      for p in people:
        note = p.note
        if note:
          print(p.full_name)
          print('-' * 40)
          print(note)
          print('=' * 40)
      

      the following version without access to the contact notes work as in the older builds... so it has nothing todo with permissions to the contacts in general...

      import contacts
      print('Address Book Notes')
      print('=' * 40)
      people = contacts.get_all_people()
      for p in people:
        print(p.full_name)
        print('-' * 40)
        print('=' * 40)
      
      posted in Pythonista
      mithrendal
      mithrendal
    • RE: 3D Games?

      for 1. see here https://forum.omz-software.com/topic/5847/scenekit-wrapper-available

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: Recommend messaging library?

      You could also use apples MFMessageComposeViewController. With that your program can automatically create a encoded message and put that onto apple messages to a receipient of your choice. The base64 encoded message databody should be prefixed with pythonista://nameofyourpyprogram?action=run&args=.... So that the Receiver just taps on the incoming message and jumps into your app. I wrote a mini tictoc app for fun which uses this method to asynchronously play with a friend. if you tell me that you want to go that direction, I could upload the example to github for you.

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: basic workflows for git repos on iOS

      If you do not see the iCloud Symbol in pythonista under

      Script Library

      • This iPhone/iPad
      • iCloud (<- if you do not see this)

      or if your iCloud drive does not contain a folder for pythonista when you want to setup the sync in working copy.

      Then just head over to the ios settings and choose iCloud and enable pythonista to be able to use the iCloud.

      posted in Pythonista
      mithrendal
      mithrendal
    • RE: basic workflows for git repos on iOS

      Until iOS13 you could simply open the working copy folder in pythonista as an external folder. This is not possible in iOS 13 with the current version of pythonisa since apple altered the document picker API for folders. See the two threads https://forum.omz-software.com/topic/5817/can-t-add-external-folder-from-working-copy-via-files-app-folders-are-not-selectable-all-folders-inside-files-app-popup and https://forum.omz-software.com/topic/5843/ios-13 for a temporary solution ... We hope that the developer @omz will adapt the new release which is currently in the beta for that new iOS13 documentpicker folder API though.

      posted in Pythonista
      mithrendal
      mithrendal