[Vobject] Adding X-WR-CALNAME parameters to vCalendar

Jeffrey Harris jeffrey at skyhouseconsulting.com
Fri Jun 4 13:43:57 CDT 2010


Hi Richard,

> Is there a way to add extension parameters to vCalenders?

Yup. There's nothing special about X- ContentLines, they're just like any other. The only wrinkle is that when directly accessing a property using vobject's custom getattr logic, you need to convert dashes to underscores, so:

>>> cal = vobject.iCalendar()
>>> cal.add('x-wr-calname')
<X-WR-CALNAME{}>
>>> cal.x_wr_calname.value = "Some named calendar"
>>> cal.x_wr_calname
<X-WR-CALNAME{}Some named calendar>

Sincerely,
Jeffrey


More information about the VObject mailing list