functools.total_ordering()

@functools.total_ordering Given a class defining one or more rich comparison ordering methods, this class decorator supplies the rest. This simplifies the effort involved in specifying all of the possible rich comparison operations: The class must define one of __lt__(), __le__(), __gt__(), or __ge__(). In addition, the class should supply an __eq__() method. For example: @total_ordering class Student: def _is_valid_operand(self, other): return (hasattr(other, "lastname") and

sys.settrace()

sys.settrace(tracefunc) Set the system’s trace function, which allows you to implement a Python source code debugger in Python. The function is thread-specific; for a debugger to support multiple threads, it must be registered using settrace() for each thread being debugged. Trace functions should have three arguments: frame, event, and arg. frame is the current stack frame. event is a string: 'call', 'line', 'return', 'exception', 'c_call', 'c_return', or 'c_exception'. arg depends on the e

turtle.seth()

turtle.seth(to_angle) Parameters: to_angle – a number (integer or float) Set the orientation of the turtle to to_angle. Here are some common directions in degrees: standard mode logo mode 0 - east 0 - north 90 - north 90 - east 180 - west 180 - south 270 - south 270 - west >>> turtle.setheading(90) >>> turtle.heading() 90.0

tempfile.NamedTemporaryFile()

tempfile.NamedTemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None, delete=True) This function operates exactly as TemporaryFile() does, except that the file is guaranteed to have a visible name in the file system (on Unix, the directory entry is not unlinked). That name can be retrieved from the name attribute of the returned file-like object. Whether the name can be used to open the file a second time, while the named temporary file is s

trace.Trace

class trace.Trace(count=1, trace=1, countfuncs=0, countcallers=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None, timing=False) Create an object to trace execution of a single statement or expression. All parameters are optional. count enables counting of line numbers. trace enables line execution tracing. countfuncs enables listing of the functions called during the run. countcallers enables call relationship tracking. ignoremods is a list of modules or packages to ignore. ignoredi

importlib.machinery.ModuleSpec

class importlib.machinery.ModuleSpec(name, loader, *, origin=None, loader_state=None, is_package=None) A specification for a module’s import-system-related state. New in version 3.4. name (__name__) A string for the fully-qualified name of the module. loader (__loader__) The loader to use for loading. For namespace packages this should be set to None. origin (__file__) Name of the place from which the module is loaded, e.g. “builtin” for built-in modules and the filename for

locale.localeconv()

locale.localeconv() Returns the database of the local conventions as a dictionary. This dictionary has the following strings as keys: Category Key Meaning LC_NUMERIC 'decimal_point' Decimal point character. 'grouping' Sequence of numbers specifying which relative positions the 'thousands_sep' is expected. If the sequence is terminated with CHAR_MAX, no further grouping is performed. If the sequence terminates with a 0, the last group size is repeatedly used. 'thousands_sep' Character use

tempfile.mkdtemp()

tempfile.mkdtemp(suffix=None, prefix=None, dir=None) Creates a temporary directory in the most secure manner possible. There are no race conditions in the directory’s creation. The directory is readable, writable, and searchable only by the creating user ID. The user of mkdtemp() is responsible for deleting the temporary directory and its contents when done with it. The prefix, suffix, and dir arguments are the same as for mkstemp(). mkdtemp() returns the absolute pathname of the new directo

multiprocessing.managers.SyncManager.Semaphore()

Semaphore([value]) Create a shared threading.Semaphore object and return a proxy for it.

cmd.Cmd.identchars

Cmd.identchars The string of characters accepted for the command prefix.