Where does this readOne() method come from?

tinnews at isbd.co.uk tinnews at isbd.co.uk
Wed Dec 28 14:04:59 EST 2011


In the (rather sparse) documentation for the vobject package it has,
in the section about parsing iCalendar objects, the following:-

    Parsing iCalendar objects
    =========================

    To parse one top level component from an existing iCalendar stream or
    string, use the readOne function:

    >>> parsedCal = vobject.readOne(icalstream)
    >>> parsedCal.vevent.dtstart.value
    datetime.datetime(2006, 2, 16, 0, 0, tzinfo=tzutc())

    Similarly, readComponents is a generator yielding one top level
    component at a time from a stream or string.

    >>> vobject.readComponents(icalstream).next().vevent.dtstart.value
    datetime.datetime(2006, 2, 16, 0, 0, tzinfo=tzutc())

    More examples can be found in source code doctests.


However *nowhere* can I find anything that tells me what or where the
readOne() is.  It's not to be found in the full epydoc API
documentation for vobject (or, at least, I can't find it).

All I want to do is read a .ics file and parse it.  I used to use the
icalendar package but that seems less well supported than vobject so
I'm trying to use vobject instead but I'm not getting far at present.

It sort of feels like "everyone knows what readOne() is", but I don't! :-)

-- 
Chris Green



More information about the Python-list mailing list