Microsoft-style format strings
AMR
alvaro at ocse.infonegocio.com
Mon May 22 12:10:18 EDT 2000
Try with this,
With this you have what you want. You can slice what you want. Problably
there are other function more similar to the Vb format, but I'm waiting for
other answer because I've tried and I can't.
>>> from time import *
>>> asctime(localtime(time()))
'Mon May 22 18:05:26 2000'
I hope it helps,
--
Alvaro Martínez
alvaro at ocse.infonegocio.com
"Andy Robinson" <andy at reportlab.com> escribió en el mensaje
news:PGECLPOBGNBNKHNAGIJHAEADCCAA.andy at reportlab.com...
> Has anybody written anything analogous to the
> VB-style format function?
>
> This would be able to do
> format("$#,##0.00", someAmount)
> or
> format("ddd dd-mmm-yyyy", someDate)
>
> Hoping-to-save-an-hour-or-two-ly y'rs,
>
> Andy Robinson
>
More information about the Python-list
mailing list