Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #18135

Where does this readOne() method come from?

From tinnews@isbd.co.uk
Newsgroups comp.lang.python
Subject Where does this readOne() method come from?
Date 2011-12-28 19:04 +0000
Message-ID <rr5ss8-hhr.ln1@chris.zbmc.eu> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Where does this readOne() method come from? tinnews@isbd.co.uk - 2011-12-28 19:04 +0000
  Re: Where does this readOne() method come from? Terry Reedy <tjreedy@udel.edu> - 2011-12-28 15:41 -0500
  Re: Where does this readOne() method come from? Chris Angelico <rosuav@gmail.com> - 2011-12-29 07:45 +1100
    Re: Where does this readOne() method come from? tinnews@isbd.co.uk - 2011-12-29 14:36 +0000

csiph-web