gettext.gettext()

gettext.gettext(message) Return the localized translation of message, based on the current global domain, language, and locale directory. This function is usually aliased as _() in the local namespace (see examples below).

gettext.find()

gettext.find(domain, localedir=None, languages=None, all=False) This function implements the standard .mo file search algorithm. It takes a domain, identical to what textdomain() takes. Optional localedir is as in bindtextdomain() Optional languages is a list of strings, where each string is a language code. If localedir is not given, then the default system locale directory is used. [2] If languages is not given, then the following environment variables are searched: LANGUAGE, LC_ALL, LC_ME

gettext.dngettext()

gettext.dngettext(domain, singular, plural, n) Like ngettext(), but look the message up in the specified domain.

gettext.dgettext()

gettext.dgettext(domain, message) Like gettext(), but look the message up in the specified domain.

gettext.bind_textdomain_codeset()

gettext.bind_textdomain_codeset(domain, codeset=None) Bind the domain to codeset, changing the encoding of strings returned by the gettext() family of functions. If codeset is omitted, then the current binding is returned.

gettext.bindtextdomain()

gettext.bindtextdomain(domain, localedir=None) Bind the domain to the locale directory localedir. More concretely, gettext will look for binary .mo files for the given domain using the path (on Unix): localedir/language/LC_MESSAGES/domain.mo, where languages is searched for in the environment variables LANGUAGE, LC_ALL, LC_MESSAGES, and LANG respectively. If localedir is omitted or None, then the current binding for domain is returned. [1]

getpass.getuser()

getpass.getuser() Return the “login name” of the user. This function checks the environment variables LOGNAME, USER, LNAME and USERNAME, in order, and returns the value of the first one which is set to a non-empty string. If none are set, the login name from the password database is returned on systems which support the pwd module, otherwise, an exception is raised.

getpass.GetPassWarning

exception getpass.GetPassWarning A UserWarning subclass issued when password input may be echoed.

getpass.getpass()

getpass.getpass(prompt='Password: ', stream=None) Prompt the user for a password without echoing. The user is prompted using the string prompt, which defaults to 'Password: '. On Unix, the prompt is written to the file-like object stream using the replace error handler if needed. stream defaults to the controlling terminal (/dev/tty) or if that is unavailable to sys.stderr (this argument is ignored on Windows). If echo free input is unavailable getpass() falls back to printing a warning mess

getopt.gnu_getopt()

getopt.gnu_getopt(args, shortopts, longopts=[]) This function works like getopt(), except that GNU style scanning mode is used by default. This means that option and non-option arguments may be intermixed. The getopt() function stops processing options as soon as a non-option argument is encountered. If the first character of the option string is '+', or if the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a non-option argument is encountered.