gettext.install()

gettext.install(domain, localedir=None, codeset=None, names=None) This installs the function _() in Python’s builtins namespace, based on domain, localedir, and codeset which are passed to the function translation(). For the names parameter, please see the description of the translation object’s install() method. As seen below, you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the _() function, like this: print(_('This string

sys.gettrace()

sys.gettrace() Get the trace function as set by settrace(). CPython implementation detail: The gettrace() function is intended only for implementing debuggers, profilers, coverage tools and the like. Its behavior is part of the implementation platform, rather than part of the language definition, and thus may not be available in all Python implementations.

socket.socket.connect_ex()

socket.connect_ex(address) Like connect(address), but return an error indicator instead of raising an exception for errors returned by the C-level connect() call (other problems, such as “host not found,” can still raise exceptions). The error indicator is 0 if the operation succeeded, otherwise the value of the errno variable. This is useful to support, for example, asynchronous connects.

curses.window.getbegyx()

window.getbegyx() Return a tuple (y, x) of co-ordinates of upper-left corner.

io.IOBase.writelines()

writelines(lines) Write a list of lines to the stream. Line separators are not added, so it is usual for each of the lines provided to have a line separator at the end.

pipes.Template

class pipes.Template An abstraction of a pipeline.

site.getsitepackages()

site.getsitepackages() Return a list containing all global site-packages directories. New in version 3.2.

queue.PriorityQueue

class queue.PriorityQueue(maxsize=0) Constructor for a priority queue. maxsize is an integer that sets the upperbound limit on the number of items that can be placed in the queue. Insertion will block once this size has been reached, until queue items are consumed. If maxsize is less than or equal to zero, the queue size is infinite. The lowest valued entries are retrieved first (the lowest valued entry is the one returned by sorted(list(entries))[0]). A typical pattern for entries is a tupl

nntplib.NNTP.body()

NNTP.body(message_spec=None, *, file=None) Same as article(), but sends a BODY command. The lines returned (or written to file) will only contain the message body, not the headers.

audioop.add()

audioop.add(fragment1, fragment2, width) Return a fragment which is the addition of the two samples passed as parameters. width is the sample width in bytes, either 1, 2, 3 or 4. Both fragments should have the same length. Samples are truncated in case of overflow.