[Vobject] Formatting international addresses
Jeffrey Harris
jeffrey at skyhouseconsulting.com
Sun Mar 6 13:20:31 CST 2011
Hi Martin,
> Unfortunately, the output format is that used in the US, not in
> Switzerland, where post code would precede city without any
> punctuation or double spaces between:
>
> Mystreet 1\n8050 Zurich\nSwitzerland
>
> The only mail on the matter I found was
> http://lists.brotherharris.com/pipermail/vobject/2009-January/000172.html,
> but the thread does not provide a solution.
>
> Am I expecting too much functionality from vobject?
>
> Would this functionality make sense in vobject?
>
> Do you know of another class to use to provide this functionality?
Indeed, there's zero localization of addresses. I don't know of Python libraries that have this sort of localization already written, but the resulting Address is little more than a glorified struct, adding an optional field that changes the __str__ behavior would be fine.
As always patches are welcome.
- Jeffrey
More information about the VObject
mailing list