Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Functions | |
def | localeconv |
def | setlocale |
def | strcoll |
def | strxfrm |
def | format |
def | str |
def | atof |
def | atoi |
def | normalize |
def | getdefaultlocale |
def | getlocale |
def | resetlocale |
Variables | |
list | __all__ |
int | CHAR_MAX = 127 |
int | LC_ALL = 6 |
int | LC_COLLATE = 3 |
int | LC_CTYPE = 0 |
int | LC_MESSAGES = 5 |
int | LC_MONETARY = 4 |
int | LC_NUMERIC = 1 |
int | LC_TIME = 2 |
Error = ValueError | |
_setlocale = setlocale | |
Locale name aliasing engine. More... | |
dictionary | encoding_alias |
Database. More... | |
dictionary | locale_alias |
dictionary | windows_locale |
Locale support. The module provides low-level access to the C lib's locale APIs and adds high level number formatting APIs as well as a locale aliasing engine to complement these. The aliasing engine includes support for many commonly used locale names and maps them to values suitable for passing to the C lib's setlocale() function. It also includes default encodings for all supported locale names.
def locale.atof | ( | str, | |
func = float |
|||
) |
def locale.format | ( | f, | |
val, | |||
grouping = 0 |
|||
) |
Formats a value in the same way that the % formatting would use, but takes the current locale into account. Grouping is applied if the third parameter is true.
Definition at line 129 of file locale.py.
References localeconv().
def locale.getdefaultlocale | ( | envvars = ('LANGUAGE', 'LC_ALL' , |
|
LC_CTYPE, | |||
LANG | |||
) |
Tries to determine the default locale settings and returns them as tuple (language code, encoding). According to POSIX, a program which has not called setlocale(LC_ALL, "") runs using the portable 'C' locale. Calling setlocale(LC_ALL, "") lets it use the default locale as defined by the LANG variable. Since we don't want to interfere with the current locale setting we thus emulate the behavior in the way described above. To maintain compatibility with other platforms, not only the LANG variable is tested, but a list of variables given as envvars parameter. The first found to be defined will be used. envvars defaults to the search path used in GNU gettext; it must always contain the variable name 'LANG'. Except for the code 'C', the language code corresponds to RFC 1766. code and encoding can be None in case the values cannot be determined.
Definition at line 289 of file locale.py.
References cgitb.lookup().
def locale.getlocale | ( | category = LC_CTYPE ) |
Returns the current setting for the given locale category as tuple (language code, encoding). category may be one of the LC_* value except LC_ALL. It defaults to LC_CTYPE. Except for the code 'C', the language code corresponds to RFC 1766. code and encoding can be None in case the values cannot be determined.
Definition at line 340 of file locale.py.
References _setlocale, normalize(), and setlocale().
def locale.localeconv | ( | ) |
def locale.normalize | ( | localename) |
Returns a normalized locale code for the given locale name. The returned locale code is formatted for use with setlocale(). If normalization fails, the original name is returned unchanged. If the given encoding is not known, the function defaults to the default encoding for the locale code just like setlocale() does.
Definition at line 199 of file locale.py.
def locale.resetlocale | ( | category = LC_ALL ) |
Sets the locale for category to the default setting. The default setting is determined by calling getdefaultlocale(). category defaults to LC_ALL.
Definition at line 374 of file locale.py.
References _setlocale, and getdefaultlocale().
def setlocale | ( | category, | |
locale = None |
|||
) |
setlocale(integer,string=None) -> string. Activates/queries locale processing.
Set the locale for the given category. The locale can be a string, a locale tuple (language code, encoding), or None. Locale tuples are converted to strings the locale aliasing engine. Locale strings are passed directly to the C lib. category may be given as one of the LC_* values.
def locale.str | ( | val) |
def locale.strcoll | ( | a, | |
b | |||
) |
def locale.strxfrm | ( | s) |
strxfrm(string) -> string. Returns a string that behaves for cmp locale-aware.
Definition at line 82 of file locale.py.
References localeconv().
list __all__ |
dictionary encoding_alias |