O'Reilly logo

Python: Essential Reference, Third Edition by David Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

locale

The locale module provides access to the POSIX locale database, which allows programmers to handle certain cultural issues in an application without knowing all the specifics of each country where the software is executed. A “locale” defines a set of parameters that describe the representation of strings, time, numbers, and currency. These parameters are grouped into the following category codes:

CategoryDescription
LC_CTYPECharacter conversion and comparison.
LC_COLLATEString sorting. Affects strcoll() and strxfrm().
LC_TIMETime formatting. Affects time.strftime().
LC_MONETARYFormatting of monetary values.
LC_MESSAGESMessage display. This may affect error messages returned by functions such as os.strerror().
LC_NUMERICNumber formatting. Affects ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required