Formatting a numerical string w/commas

Martin von Loewis loewis at
Tue Feb 22 06:54:13 EST 2000

> Hmmm.... this is actually interesting ;-)
> _locale seems to be built in on my windows box, but not on my linux
> or hp boxes...

As with all builtin modules relying on extended libraries: You'll have
to specify which libraries you want by modifying Modules/Setup when
compiling Python.

With the _locale module, you only need the standard locale functions
in the C library, so it should work on must current systems. Still,
the Python installation mechanism is not autoconfiscated to the degree
that it figures out what extension modules to use. Apparently, most
Linux distributors don't think this function important enough to
activate it by default - complain to your Linux vendor :-) As for
Python on hpux, it is probably your own fault that it is not

On Windows, these things are much easier, because only a single vendor
decides what base libraries and functions are available ;-) and locale
functions are part of that.


More information about the Python-list mailing list