Is there a way to push data into Ical from Python ?

dwhall dwhall256 at gmail.com
Sun Dec 17 09:02:40 EST 2006


You could save your calendar_ to a .ics file which is in the VCal_ file
format; but that requires the extra step of manually saving your
calendar to a file or accessing the files that iCal creates behind the
scenes in ~/Library/Application Support/iCal/Sources/ which is unclear
and potentially hazardous to your data.

I'm guessing you would prefer to access the calendar data directly from
the script, like an Applescript would.  One way would be to use
Python's tie-ins to Applescript_ and apple events (AE).  As you will
read, this support isn't as strong as it used to be.

Another idea that would require more effort, but earn you some hacker
points, is to use PyObjC_ and access iCal's public programming
interface.

But by far the easiest is to google for what you want (my search was
for: "ical api"), find the iCalModule_ and try to make that work for
you.  Although that module appears to only read the data and is
targeted toward 3rd-party calendars that are stored in
~/Library/Calendars.

share and enjoy,

!!Dean

.. _calendar: http://en.wikipedia.org/wiki/ICalendar
.. _VCal: http://en.wikipedia.org/wiki/VCal
.. _Applescript: http://pythonmac.org/wiki/AppleScript
.. _PyObjC: http://pyobjc.sourceforge.net/
.. _iCalModule: http://www.devoesquared.com/Software/iCal_Module

The Night Blogger wrote:
> Is there a way to pull & push data into (Apple Mac OS X Calendar) Ical from
> Python ?




More information about the Python-list mailing list