termios.tcsetattr()

termios.tcsetattr(fd, when, attributes) Set the tty attributes for file descriptor fd from the attributes, which is a list like the one returned by tcgetattr(). The when argument determines when the attributes are changed: TCSANOW to change immediately, TCSADRAIN to change after transmitting all queued output, or TCSAFLUSH to change after transmitting all queued output and discarding all queued input.

logging.LoggerAdapter

class logging.LoggerAdapter(logger, extra) Returns an instance of LoggerAdapter initialized with an underlying Logger instance and a dict-like object. process(msg, kwargs) Modifies the message and/or keyword arguments passed to a logging call in order to insert contextual information. This implementation takes the object passed as extra to the constructor and adds it to kwargs using key ‘extra’. The return value is a (msg, kwargs) tuple which has the (possibly modified) versions of the ar

shutil.get_archive_formats()

shutil.get_archive_formats() Return a list of supported formats for archiving. Each element of the returned sequence is a tuple (name, description). By default shutil provides these formats: gztar: gzip’ed tar-file bztar: bzip2’ed tar-file (if the bz2 module is available.) xztar: xz’ed tar-file (if the lzma module is available.) tar: uncompressed tar file zip: ZIP file You can register new formats or provide your own archiver for any existing formats, by using register_archive_format(

xdrlib.Unpacker.get_position()

Unpacker.get_position() Returns the current unpack position in the data buffer.

itertools.groupby()

itertools.groupby(iterable, key=None) Make an iterator that returns consecutive keys and groups from the iterable. The key is a function computing a key value for each element. If not specified or is None, key defaults to an identity function and returns the element unchanged. Generally, the iterable needs to already be sorted on the same key function. The operation of groupby() is similar to the uniq filter in Unix. It generates a break or new group every time the value of the key function

threading.Thread.start()

start() Start the thread’s activity. It must be called at most once per thread object. It arranges for the object’s run() method to be invoked in a separate thread of control. This method will raise a RuntimeError if called more than once on the same thread object.

datetime.date.fromtimestamp()

classmethod date.fromtimestamp(timestamp) Return the local date corresponding to the POSIX timestamp, such as is returned by time.time(). This may raise OverflowError, if the timestamp is out of the range of values supported by the platform C localtime() function, and OSError on localtime() failure. It’s common for this to be restricted to years from 1970 through 2038. Note that on non-POSIX systems that include leap seconds in their notion of a timestamp, leap seconds are ignored by fromtim

select.devpoll()

select.devpoll() (Only supported on Solaris and derivatives.) Returns a /dev/poll polling object; see section /dev/poll Polling Objects below for the methods supported by devpoll objects. devpoll() objects are linked to the number of file descriptors allowed at the time of instantiation. If your program reduces this value, devpoll() will fail. If your program increases this value, devpoll() may return an incomplete list of active file descriptors. The new file descriptor is non-inheritable.

decimal.Context

class decimal.Context(prec=None, rounding=None, Emin=None, Emax=None, capitals=None, clamp=None, flags=None, traps=None) Creates a new context. If a field is not specified or is None, the default values are copied from the DefaultContext. If the flags field is not specified or is None, all flags are cleared. prec is an integer in the range [1, MAX_PREC] that sets the precision for arithmetic operations in the context. The rounding option is one of the constants listed in the section Rounding

email.generator.BytesGenerator.flatten()

flatten(msg, unixfrom=False, linesep=None) Print the textual representation of the message object structure rooted at msg to the output file specified when the BytesGenerator instance was created. Subparts are visited depth-first and the resulting text will be properly MIME encoded. If the policy option cte_type is 8bit (the default), then any bytes with the high bit set in the original parsed message that have not been modified will be copied faithfully to the output. If cte_type is 7bit, t