[Tutor] PyCountry currency formatting woes

Marc Tompkins marc.tompkins at gmail.com
Mon May 5 06:26:43 CEST 2014


On Sun, May 4, 2014 at 1:55 PM, Sithembewena Lloyd Dube
<zebra05 at gmail.com>wrote:

> Thanks, i was actually getting the error information to update the post.
> Apoligies to waste your time posting here - I could not find an appropriate
> PyCountry discussion list and my next best bet seemed to be a Python users'
> list.
>
>
You also posted on StackOverflow; I just answered you there.  In short: the
currency numeric is not guaranteed to be the same as the country numeric
(in the case of the Euro, how could it possibly be?)  The numeric for DE is
276; the numeric for the Euro is 978.  Obviously they don't match.

PyCountry is a wrapper around some tables provided by Debian; those tables
don't include a country/currency mapping.  You can find those mapping
tables at
     http://www.currency-iso.org/en/home/tables/table-a1.html
and roll your own wrapper; I'm sure it's been done a thousand times before,
but I'm not aware of a Python package that does this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140504/c830f17a/attachment.html>


More information about the Tutor mailing list