[Vobject] how to add multiple events to a calendar ?

Didier BRETIN didier at bretin.net
Fri Jul 13 00:22:22 CDT 2007


On 13/07/2007 00:48, Jeffrey Harris wrote:
> import vobject, datetime
> 
> cal = vobject.iCalendar()
> ev1 = cal.add('vevent')
> ev1.add('dtstart').value = datetime.datetime.now()
> ev1.add('summary').value = "First event"
> ev2 = cal.add('vevent')
> ev2.add('dtstart').value = datetime.datetime.now()
> ev2.add('summary').value = "Second event"
> print [ev.dtstart for ev in cal.vevent_list]

Thanks it works !
-- 
Didier BRETIN
http://www.bretin.net/



More information about the VObject mailing list