os.writev()

os.writev(fd, buffers) Write the contents of buffers to file descriptor fd. buffers must be a sequence of bytes-like objects. Buffers are processed in array order. Entire contents of first buffer is written before proceeding to second, and so on. The operating system may set a limit (sysconf() value SC_IOV_MAX) on the number of buffers that can be used. writev() writes the contents of each object to the file descriptor and returns the total number of bytes written. Availability: Unix. New i

asyncio.SubprocessProtocol

class asyncio.SubprocessProtocol The base class for implementing protocols communicating with child processes (through a set of unidirectional pipes).

unittest.TestLoader.loadTestsFromName()

loadTestsFromName(name, module=None) Return a suite of all tests cases given a string specifier. The specifier name is a “dotted name” that may resolve either to a module, a test case class, a test method within a test case class, a TestSuite instance, or a callable object which returns a TestCase or TestSuite instance. These checks are applied in the order listed here; that is, a method on a possible test case class will be picked up as “a test method within a test case class”, rather than

uuid.uuid4()

uuid.uuid4() Generate a random UUID.

tempfile.SpooledTemporaryFile()

tempfile.SpooledTemporaryFile(max_size=0, mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None) This function operates exactly as TemporaryFile() does, except that data is spooled in memory until the file size exceeds max_size, or until the file’s fileno() method is called, at which point the contents are written to disk and operation proceeds as with TemporaryFile(). The resulting file has one additional method, rollover(), which causes the file to rol

re.match.groups()

match.groups(default=None) Return a tuple containing all the subgroups of the match, from 1 up to however many groups are in the pattern. The default argument is used for groups that did not participate in the match; it defaults to None. For example: >>> m = re.match(r"(\d+)\.(\d+)", "24.1632") >>> m.groups() ('24', '1632') If we make the decimal place and everything after it optional, not all groups might participate in the match. These groups will default to None unless

os.DirEntry.is_dir()

is_dir(*, follow_symlinks=True) Return True if this entry is a directory or a symbolic link pointing to a directory; return False if the entry is or points to any other kind of file, or if it doesn’t exist anymore. If follow_symlinks is False, return True only if this entry is a directory (without following symlinks); return False if the entry is any other kind of file or if it doesn’t exist anymore. The result is cached on the DirEntry object, with a separate cache for follow_symlinks True

RecursionError

exception RecursionError This exception is derived from RuntimeError. It is raised when the interpreter detects that the maximum recursion depth (see sys.getrecursionlimit()) is exceeded. New in version 3.5: Previously, a plain RuntimeError was raised.

netrc.netrc

class netrc.netrc([file]) A netrc instance or subclass instance encapsulates data from a netrc file. The initialization argument, if present, specifies the file to parse. If no argument is given, the file .netrc in the user’s home directory will be read. Parse errors will raise NetrcParseError with diagnostic information including the file name, line number, and terminating token. If no argument is specified on a POSIX system, the presence of passwords in the .netrc file will raise a NetrcPa

asyncio.run_coroutine_threadsafe()

asyncio.run_coroutine_threadsafe(coro, loop) Submit a coroutine object to a given event loop. Return a concurrent.futures.Future to access the result. This function is meant to be called from a different thread than the one where the event loop is running. Usage: # Create a coroutine coro = asyncio.sleep(1, result=3) # Submit the coroutine to a given loop future = asyncio.run_coroutine_threadsafe(coro, loop) # Wait for the result with an optional timeout argument assert future.result(timeout