Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Python 3.11.3

Contenu du module « locale »

Liste des exceptions du module locale

Nom de la classe d'exception Description
Error

Liste des fonctions du module locale

Signature de la fonction Description
atof(string, func=<class 'float'>) Parses a string as a float according to the locale settings. [extrait de atof.__doc__]
atoi(string) Converts a string to an integer according to the locale settings. [extrait de atoi.__doc__]
bind_textdomain_codeset(domain, codeset) Bind the C library's domain to codeset. [extrait de bind_textdomain_codeset.__doc__]
bindtextdomain(domain, dir) Bind the C library's domain to dir. [extrait de bindtextdomain.__doc__]
currency(val, symbol=True, grouping=False, international=False) Formats val according to the currency settings [extrait de currency.__doc__]
dcgettext(domain, msg, category) Return translation of msg in domain and category. [extrait de dcgettext.__doc__]
delocalize(string) Parses a string as a normalized number according to the locale settings. [extrait de delocalize.__doc__]
dgettext(domain, msg) dgettext(domain, msg) -> string [extrait de dgettext.__doc__]
format(percent, value, grouping=False, monetary=False, *additional) Deprecated, use format_string instead. [extrait de format.__doc__]
format_string(f, val, grouping=False, monetary=False) Formats a string in the same way that the % formatting would use, [extrait de format_string.__doc__]
getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')) Tries to determine the default locale settings and returns [extrait de getdefaultlocale.__doc__]
getencoding() Get the current locale encoding. [extrait de getencoding.__doc__]
getlocale(category=0) Returns the current setting for the given locale category as [extrait de getlocale.__doc__]
getpreferredencoding(do_setlocale=True) Return the charset that the user is likely using, [extrait de getpreferredencoding.__doc__]
gettext(msg) gettext(msg) -> string [extrait de gettext.__doc__]
localeconv() Returns numeric and monetary locale-specific parameters. [extrait de localeconv.__doc__]
localize(string, grouping=False, monetary=False) Parses a string as locale number according to the locale settings. [extrait de localize.__doc__]
nl_langinfo(key) Return the value for the locale information associated with key. [extrait de nl_langinfo.__doc__]
normalize(localename) Returns a normalized locale code for the given locale [extrait de normalize.__doc__]
resetlocale(category=6) Sets the locale for category to the default setting. [extrait de resetlocale.__doc__]
setlocale(category, locale=None) Set the locale for the given category. The locale can be [extrait de setlocale.__doc__]
str(val) Convert float to string, taking the locale into account. [extrait de str.__doc__]
strcoll(os1, os2) Compares two strings according to the locale. [extrait de strcoll.__doc__]
strxfrm(string) Return a string that can be used as a key for locale-aware comparisons. [extrait de strxfrm.__doc__]
textdomain(domain) Set the C library's textdmain to domain, returning the new domain. [extrait de textdomain.__doc__]

Liste des variables globales du module locale

Nom de la variable globale Valeur
ABDAY_1 131072
ABDAY_2 131073
ABDAY_3 131074
ABDAY_4 131075
ABDAY_5 131076
ABDAY_6 131077
ABDAY_7 131078
ABMON_1 131086
ABMON_10 131095
ABMON_11 131096
ABMON_12 131097
ABMON_2 131087
ABMON_3 131088
ABMON_4 131089
ABMON_5 131090
ABMON_6 131091
ABMON_7 131092
ABMON_8 131093
ABMON_9 131094
ALT_DIGITS 131119
AM_STR 131110
CHAR_MAX 127
CODESET 14
CRNCYSTR 262159
D_FMT 131113
D_T_FMT 131112
DAY_1 131079
DAY_2 131080
DAY_3 131081
DAY_4 131082
DAY_5 131083
DAY_6 131084
DAY_7 131085
ERA 131116
ERA_D_FMT 131118
ERA_D_T_FMT 131120
ERA_T_FMT 131121
LC_ALL 6
LC_COLLATE 3
LC_CTYPE 0
LC_MESSAGES 5
LC_MONETARY 4
LC_NUMERIC 1
LC_TIME 2
locale_alias Contenu de type <class 'dict'>
locale_encoding_alias Contenu de type <class 'dict'>
MON_1 131098
MON_10 131107
MON_11 131108
MON_12 131109
MON_2 131099
MON_3 131100
MON_4 131101
MON_5 131102
MON_6 131103
MON_7 131104
MON_8 131105
MON_9 131106
NOEXPR 327681
PM_STR 131111
RADIXCHAR 65536
T_FMT 131114
T_FMT_AMPM 131115
THOUSEP 65537
windows_locale Contenu de type <class 'dict'>
YESEXPR 327680