omz:forum

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

    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 2
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    bcohen44

    @bcohen44

    0
    Reputation
    357
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    bcohen44 Unfollow Follow

    Latest posts made by bcohen44

    • When is Pythonista 3.3 going to be released?

      Just curious.....seems like are a bunch of new features I'd like to use...and Beta is closed.

      posted in Pythonista
      bcohen44
      bcohen44
    • RE: Reminders .save() only saves the last item in a list/dictionary as a reminder

      This worked, thanks!

      posted in Pythonista
      bcohen44
      bcohen44
    • Reminders .save() only saves the last item in a list/dictionary as a reminder

      I am looping thru a json object, and for each occurence of an entry that has a key of start , I want to create Reminders to a specific list (Active list in this case, could be anything, even the default). What I am finding is that it seems the r.save() is only saving the last task in the for loop below.

      Any idea?

      Basic code snippet

      import reminders
      import requests
      
      URL = 'some URL'
      headers = ' blah, blah'
      req = requests.get(URL, headers=headers)
      all_tasks = req.json()
      all_calendars = reminders.get_all_calendars()
      
      for calendar in all_calendars
          if calendar.title == 'Active':
              r = reminders.Reminder(calendar)
      
      for task in all_tasks:
          if 'start' in task:
              r.title = task['description']
              r.save()
      
      posted in Pythonista
      bcohen44
      bcohen44