Money formatting

Tonguc Yumruk tongucyumruk at member.fsf.org
Sun Jul 4 05:21:38 EDT 2004


I'm trying to format an integer as money. As far as i can see there is
no strfmon() in python. I also tried the
locale.format("%.2f",100000000,True) way but it does not even made the
grouping work. I tried to hack some locale-related files (especially
/usr/share/i18n/locales/tr_TR), but it dosn't worked either. Of course I
can use brute force and make grouping and money formatting to work by
hand but I think it's not a very pythonic way. Are there any library
functions which I'm missing? Or will I have to use brute force?

My system is:
Debian GNU/Linux: Sarge
Python Version: Python 2.3.4
Locale: tr_TR.ISO8859-9

-- 
Love Respect GNU/Linux
########################################################################
<MrCurious> by the power of greyskull
<MrCurious> someone tell me the ban to place
<Sopwith> mrcurious: *.debian.org, *.novare.net
<philX> *.debian.org.  that's awesome.
        -- Seen on LinuxNet #linux
########################################################################
Tonguç Yumruk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20040704/cd45cbcc/attachment.sig>


More information about the Python-list mailing list