[CalendarServer-changes] [6228] CalendarServer/trunk/contrib/performance/display-calendar-events.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 1 08:47:32 PDT 2010


Revision: 6228
          http://trac.macosforge.org/projects/calendarserver/changeset/6228
Author:   exarkun at twistedmatrix.com
Date:     2010-09-01 08:47:31 -0700 (Wed, 01 Sep 2010)
Log Message:
-----------
simple CalendarStore-using example

Added Paths:
-----------
    CalendarServer/trunk/contrib/performance/display-calendar-events.py

Added: CalendarServer/trunk/contrib/performance/display-calendar-events.py
===================================================================
--- CalendarServer/trunk/contrib/performance/display-calendar-events.py	                        (rev 0)
+++ CalendarServer/trunk/contrib/performance/display-calendar-events.py	2010-09-01 15:47:31 UTC (rev 6228)
@@ -0,0 +1,9 @@
+from Cocoa import NSDate
+from CalendarStore import CalCalendarStore
+
+store = CalCalendarStore.defaultCalendarStore()
+calendars = store.calendars()
+predicate = CalCalendarStore.eventPredicateWithStartDate_endDate_calendars_(
+    NSDate.date(), NSDate.distantFuture(),
+    [calendars[2]])
+print store.eventsWithPredicate_(predicate)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100901/8bb96c94/attachment.html>


More information about the calendarserver-changes mailing list