[Vobject] hello, vobject plans

Jeffrey Harris jeffrey at skyhouseconsulting.com
Thu Oct 21 14:06:18 CDT 2004


Hi Matt,

I'm not able to reproduce your error.  The only change I made was to 
replace:

aString = open('/home/matt/test_calendar/calendar.ics', 'r').read()
f = StringIO.StringIO(aString)

with

f = file('calendar.ics') #I put calendar.ics in the same dir

Note that StringIO makes a string act like a stream, you don't need it 
if you've already got your string stored in a file.

Also note that:

if type(w) == 'vobject.ContentLine':

can be written

if isinstance(w, vobject.ContentLine):

which is a few more characters but more legible, I think (and it'll work 
for subclasses of ContentLine, to boot).

Sincerely,
Jeffrey


More information about the Vobject mailing list