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.GNUTranslations.lngettext()

GNUTranslations.lngettext(singular, plural, n) Equivalent to gettext(), but the translation is returned as a bytestring encoded in the selected output charset, or in the preferred system encoding if no encoding was explicitly set with set_output_charset().

gettext.dngettext()

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

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

getpass.GetPassWarning

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

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.

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]

getopt.error

exception getopt.error Alias for GetoptError; for backward compatibility.