[Tutor] printing monetary values

Derrick 'dman' Hudson dman@dman.ddts.net
Mon, 26 Aug 2002 17:50:38 -0400


--BwCQnh7xodEAoBMC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I just know I've seen mention before of a library function that
properly formats money as a string, but I can't seem to find it
anywhere.  I want to receive a NUMERIC(15,2) data from a SQL database
(eg, 3275.68) and have it displayed as $3,275.68.  (dollar sign,
commas, and decimal)  I've searched the Vaults of Parnassus, the
'locale' module, and comp.lang.python, but didn't find anything except
a few partial examples of how to implement it myself.

TIA,
-D

--=20
The heart is deceitful above all things
    and beyond cure.
    Who can understand it?
=20
I the Lord search the heart
    and examine the mind,
to reward a man according to his conduct,
    according to what his deeds deserve.
=20
        Jeremiah 17:9-10
=20
http://dman.ddts.net/~dman/

--BwCQnh7xodEAoBMC
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj1qoq4ACgkQO8l8XBKTpRSqnQCdGqXc/09KFFerJNKuyBNcEFh/
YxcAoMxO9n7PkuKXWvOqCrauXpEqdzzG
=Sf8L
-----END PGP SIGNATURE-----

--BwCQnh7xodEAoBMC--