Is it me or is the python-vobject documentation rather lacking?

cl at isbd.net cl at isbd.net
Tue Mar 26 10:03:19 EDT 2013


I'm trying to use the python vobject package instead of what I use at
the moment (the icalendar package) because it's more widely supported
and available from my Linux repository.

However I'm having a really hard time actually working out how to use
it. The 'Usage examples' at http://vobject.skyhouseconsulting.com/usage.html
have very little about parsing existing .ics files and say "More
examples can be found in source code doctests."  I can't find those
examples at all.  The only test code I can see comprises direct data
entry using the python interpreter directly and is just a mess.

I can open a .ics file and vobject parses it:-

    >>> f = open("orage.ics")
    >>> p = vobject.readOne(f)
    >>> p.vevent.dtstart.value
    datetime.date(2012, 3, 16)

... but then I need to know how to iterate through the .ics file and how
to get all the other fields out of an event entry.

Can anyone point me at some examples that do something rather more
extensive than the above example?

Alternatively where do I find how to extract other fields from a vevent
as values like vevent.dtstart.value?  These don't seem to be documented
anywhere obvious in http://vobject.skyhouseconsulting.com/epydoc/.


-- 
Chris Green



More information about the Python-list mailing list