Home | History | Annotate | Download | only in Modules

Lines Matching defs:locale

15 #include <locale.h>
51 "(integer,string=None) -> string. Activates/queries locale processing.");
161 char *locale = NULL, *result;
164 if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale))
170 PyErr_SetString(Error, "invalid locale category");
175 if (locale) {
176 /* set locale */
177 result = setlocale(category, locale);
180 PyErr_SetString(Error, "unsupported locale setting");
192 /* get locale */
195 PyErr_SetString(Error, "locale query failed");
204 "() -> dict. Returns numeric and monetary locale-specific parameters.");
273 "string,string -> int. Compares two strings according to the locale.");
353 "string -> string. Returns a string that behaves for cmp locale-aware.");
388 char locale[100];
394 locale, sizeof(locale))) {
395 Py_ssize_t i = strlen(locale);
396 locale[i++] = '_';
399 locale+i, (int)(sizeof(locale)-i)))
400 return Py_BuildValue("ss", locale, encoding);
407 locale[0] = '0';
408 locale[1] = 'x';
410 locale+2, sizeof(locale)-2)) {
411 return Py_BuildValue("ss", locale, encoding);
531 "Return the value for the locale information associated with key.");
739 Error = PyErr_NewException("locale.Error", NULL, NULL);