macOS specific - reading calendar information

Jan Erik Moström lists at mostrom.pp.se
Thu Mar 15 03:32:35 EDT 2018


On 14 Mar 2018, at 21:40, Larry Martell wrote:

>> I've been trying to find some example of how to read calendar info on 
>> macOS
>> but I haven't found anything ... I'm probably just bad at searching 
>> !!
>>
>> What I want to do is to read calendar info for a date range. Does 
>> anyone
>> know of an example of how to do this?
>
>
> What does 'read calendar info' mean? What exactly are you trying to 
> read from?

I would like to read what calendar events I have on a range of days. I 
would like to get the data from whatever storage Calendar use, in my 
personal case I sync to iCloud.

An example would be something along these lines

x = getcalendarevents('2018-03-15', '2018-03-25')

or even better

x = getcalendarevents('2018-03-15', '2018-03-25',[calendar1, calendar2, 
...])


and x would contain some data structure that gives me the events that 
occurs from 2018-03-15 up to and including 2018-03-25, each event 
containing at least start/end time, title, place, calendar to which the 
event belong.

= jem



More information about the Python-list mailing list