On Wed, 23 Mar 2005 20:52:06 +1000, Timothy Smith
<[EMAIL PROTECTED]> wrote:
> Serge Orlov wrote:
>
> >Are you trying to format money? Then you need a special class so that
> >you can say:
>
> thats exactly what i'm trying to do, only having to do that for all my
If you're dealing with money, tw
Serge Orlov wrote:
Timothy Smith wrote:
Serge Orlov wrote:
Timothy Smith wrote:
thats ok, but how do i get it to group thousands with a , ?
and thats would mean i'd have to run everything through a formatter
before i displayed it :/ it'd be nicer if i could just select a
proper local
> SUS has added numeric grouping
>
>For some numeric conversions a radix character (`decimal
>point') or thousands' grouping character is used. The
>actual character used depends on the LC_NUMERIC part of
>the locale. The POSIX locale uses `.' as radix ch
Timothy Smith wrote:
Serge Orlov wrote: ...
d = Dollars(100.01)
print "You have %s in your account" % d
and get
You have $1,000,000.01 in your account.
thats exactly what i'm trying to do, only having to do that for all my
outputs is more work then i'd like :/
why is this a misuse of lo
Timothy Smith wrote:
> Serge Orlov wrote:
>
> >Timothy Smith wrote:
> >
> >
> >>thats ok, but how do i get it to group thousands with a , ?
> >>and thats would mean i'd have to run everything through a formatter
> >>before i displayed it :/ it'd be nicer if i could just select a
> >>proper locale
>
Serge Orlov wrote:
Timothy Smith wrote:
thats ok, but how do i get it to group thousands with a , ?
and thats would mean i'd have to run everything through a formatter
before i displayed it :/ it'd be nicer if i could just select a
proper locale
I think you're misusing locale. There is no g
Timothy Smith wrote:
> thats ok, but how do i get it to group thousands with a , ?
> and thats would mean i'd have to run everything through a formatter
> before i displayed it :/ it'd be nicer if i could just select a
> proper locale
I think you're misusing locale. There is no guarantee that any
In <[EMAIL PROTECTED]>, Timothy Smith
wrote:
>>> hi there i need to set my locale so that when i output a number it's
>>> formatted with thousands grouped. [รข]
>>
>> import locale
>> locale
>> locale.setlocale(LC_ALL, '')
>> locale.format('%.2f', 100, True)
>>
>>The `True` turns on grouping
Marc 'BlackJack' Rintsch wrote:
In <[EMAIL PROTECTED]>, Timothy Smith
wrote:
hi there i need to set my locale so that when i output a number it's
formatted with thousands grouped. the problem i've found is there
doesn't seem to be very good cross platform support for locales, even
between uni
In <[EMAIL PROTECTED]>, Timothy Smith
wrote:
> hi there i need to set my locale so that when i output a number it's
> formatted with thousands grouped. the problem i've found is there
> doesn't seem to be very good cross platform support for locales, even
> between unix's it's horrid.
Have you
10 matches
Mail list logo