threading.Thread.getName()

getName() setName() Old getter/setter API for name; use it directly as a property instead.

runpy.run_path()

runpy.run_path(file_path, init_globals=None, run_name=None) Execute the code at the named filesystem location and return the resulting module globals dictionary. As with a script name supplied to the CPython command line, the supplied path may refer to a Python source file, a compiled bytecode file or a valid sys.path entry containing a __main__ module (e.g. a zipfile containing a top-level __main__.py file). For a simple script, the specified code is simply executed in a fresh module namesp

test.support.captured_stderr()

test.support.captured_stderr() A context managers that temporarily replaces the named stream with io.StringIO object. Example use with output streams: with captured_stdout() as stdout, captured_stderr() as stderr: print("hello") print("error", file=sys.stderr) assert stdout.getvalue() == "hello\n" assert stderr.getvalue() == "error\n" Example use with input stream: with captured_stdin() as stdin: stdin.write('hello\n') stdin.seek(0) # call test code that consumes from sy

sqlite3.Cursor.lastrowid

lastrowid This read-only attribute provides the rowid of the last modified row. It is only set if you issued an INSERT statement using the execute() method. For operations other than INSERT or when executemany() is called, lastrowid is set to None.

importlib.find_loader()

importlib.find_loader(name, path=None) Find the loader for a module, optionally within the specified path. If the module is in sys.modules, then sys.modules[name].__loader__ is returned (unless the loader would be None or is not set, in which case ValueError is raised). Otherwise a search using sys.meta_path is done. None is returned if no loader is found. A dotted name does not have its parent’s implicitly imported as that requires loading them and that may not be desired. To properly impor

csv.Sniffer

class csv.Sniffer The Sniffer class is used to deduce the format of a CSV file. The Sniffer class provides two methods: sniff(sample, delimiters=None) Analyze the given sample and return a Dialect subclass reflecting the parameters found. If the optional delimiters parameter is given, it is interpreted as a string containing possible valid delimiter characters. has_header(sample) Analyze the sample text (presumed to be in CSV format) and return True if the first row appears to be a

importlib.machinery.FileFinder

class importlib.machinery.FileFinder(path, *loader_details) A concrete implementation of importlib.abc.PathEntryFinder which caches results from the file system. The path argument is the directory for which the finder is in charge of searching. The loader_details argument is a variable number of 2-item tuples each containing a loader and a sequence of file suffixes the loader recognizes. The loaders are expected to be callables which accept two arguments of the module’s name and the path to

xdrlib.Packer.pack_farray()

Packer.pack_farray(n, array, pack_item) Packs a fixed length list (array) of homogeneous items. n is the length of the list; it is not packed into the buffer, but a ValueError exception is raised if len(array) is not equal to n. As above, pack_item is the function used to pack each element.

codecs.lookup()

codecs.lookup(encoding) Looks up the codec info in the Python codec registry and returns a CodecInfo object as defined below. Encodings are first looked up in the registry’s cache. If not found, the list of registered search functions is scanned. If no CodecInfo object is found, a LookupError is raised. Otherwise, the CodecInfo object is stored in the cache and returned to the caller.

io.TextIOBase.errors

errors The error setting of the decoder or encoder.