[Zope] Formatting numbers with commas in Python Script or ZPT

Dylan Reinhardt zope@dylanreinhardt.com
Wed, 19 Feb 2003 15:18:43 -0800


Luckily, this *is* an easy question. :-)

For a value my_amount, use:

<dtml-var my_amount fmt="dollars-and-cents" thousands_commas>

Dylan


At 02:56 PM 2/19/2003, Michael LaPera wrote:
>Hello,
>
>I thought this would be easy, but I can seem to figure out how to format a 
>number with commas (US currency).  I tried python re module, but it kept 
>giving me a login screen (I guess you can't use the re module in Zope?).
>
>Any suggestions would be appreciated.
>
>Thanks,
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://mail.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
>http://mail.zope.org/mailman/listinfo/zope-dev )