omz:forum

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

    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 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    sgamel

    @sgamel

    Mac fan and iOS addict. Web developer I also have a bunch of apps in Apple’s App Stores.
    But the way I wrote few books in French, especially about Automator.

    0
    Reputation
    448
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website SylvainGamel.fr/ Location France

    sgamel Unfollow Follow

    Latest posts made by sgamel

    • RE: How can add_group() be used?

      I had an error because initially my default contact container was Google Exchange. I did change to iCloud and this should have fixed the issue.

      But it didn’t. I had to kill Pythonista and rerun my script to get my script run without arrow.

      My guess is that Pythonista kept the reference to Google contacts in some way and did not take my change into account.

      It is now working. Thanks for your reply.

      posted in Pythonista
      sgamel
      sgamel
    • How can add_group() be used?

      Hi,

      I’m trying to use the add_group function in Pythonista.
      I create a group object, set a name and call save.

      Seems that save fails with error, but I see no details in the console.

      Anything that I missed ?

      Here is my code:

      import contacts
      
      print('Groups {0.name!r}'.format(groupNames)) 
      
      allowed = contacts.is_authorized()
      print('Access to contacts allowed: {!r}'.format(allowed))
      
      group = contacts.Group()
      group.name = 'testing'
      print('Group {!r} - id: {!r}'.format(group.name, group.id))
      
      state = contacts.add_group(group)
      print('add group response: {!r}'.format(state))
      
      state = contacts.save()
      print('save response: {!r}'.format(state))
      
      print('Group {!r} - id: {!r}'.format(group.name, group.id))
      
      posted in Pythonista
      sgamel
      sgamel