

If field in ('SUMMARY', 'DESCRIPTION', 'DTSTAMP'): ics file, but we don't really care for the example

What about parsing the data about the events: g = open('example.ics','rb')įour years later and understanding ICS format a bit better, if those were the only fields I needed, I'd just use the native string methods: import io SUMMARY:Python meeting about what lies in this file? g = open('example.ics','rb') Tadaaa, you get this file: BEGIN:VCALENDAR PRODID:-//Lotus Development Corporation//NONSGML Notes 8.0//ENĭESCRIPTION:Emails\nDarlene\n Murphy\nDr. What is the best way to parse it? I need to retrieve the Summary, Description, and Time for each of the entries.
