[Vobject] Parsing Vcard.

fred at tektosworld.com fred at tektosworld.com
Thu Sep 24 22:42:38 CDT 2009


Hi,

I am using Vobject to parse vcards. I have an issue to access some field.

Here is the vcard:
*BEGIN:VCARD
VERSION:3.0
FN:Daffy Duck Knudson (with Bugs Bunny and Mr. Pluto)
N:Knudson;Daffy Duck (with Bugs Bunny and Mr. Pluto)
NICKNAME:gnat and gnu and pluto
BDAY;value=date:02-10
TEL;type=HOME:+01-(0)2-765.43.21
TEL;type=CELL:+01-(0)5-555.55.55
ACCOUNT;type=HOME:010-1234567-05
ADR;type=HOME:;;Haight Street 512\;\nEscape\, 
Test;Novosibirsk;;80214;Gnuland
TEL;type=HOME:+01-(0)2-876.54.32
ORG:University of Novosibirsk\, Department of Octopus
  Parthenogenesis
END:VCARD*

I can access the most of the fields, example:
 >>> print vcard.n
<N{} Daffy Duck (with Bugs Bunny and Mr. Pluto)  Knudson >
 >>> print vcard.n.value.family
Knudson
 >>> print vcard.bday
<BDAY{u'VALUE': [u'date']}02-10>
 >>> print vcard.tel
<TEL{u'TYPE': [u'HOME']}*+01-(0)2-765.43.21*>
 >>> print vcard.tel.value
*+01-(0)2-765.43.21*

*However, this vcard has 3 phone numbers and I can only access the first 
one (using vcard.tel), so how can I access the two other phone number ?*

Thank you for your help and Best Regards,

Fred.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.skyhouseconsulting.com/pipermail/vobject/attachments/20090925/dfba188f/attachment.htm 


More information about the VObject mailing list