set.add()

add(elem) Add element elem to the set.

codeop.compile_command()

codeop.compile_command(source, filename="", symbol="single") Tries to compile source, which should be a string of Python code and return a code object if source is valid Python code. In that case, the filename attribute of the code object will be filename, which defaults to '<input>'. Returns None if source is not valid Python code, but is a prefix of valid Python code. If there is a problem with source, an exception will be raised. SyntaxError is raised if there is invalid Python synt

os.remove()

os.remove(path, *, dir_fd=None) Remove (delete) the file path. If path is a directory, OSError is raised. Use rmdir() to remove directories. This function can support paths relative to directory descriptors. On Windows, attempting to remove a file that is in use causes an exception to be raised; on Unix, the directory entry is removed but the storage allocated to the file is not made available until the original file is no longer in use. This function is semantically identical to unlink().

email.policy.Compat32

class email.policy.Compat32(**kw) This concrete Policy is the backward compatibility policy. It replicates the behavior of the email package in Python 3.2. The policy module also defines an instance of this class, compat32, that is used as the default policy. Thus the default behavior of the email package is to maintain compatibility with Python 3.2. The following attributes have values that are different from the Policy default: mangle_from_ The default is True. The class provides the

logging.handlers.BufferingHandler

class logging.handlers.BufferingHandler(capacity) Initializes the handler with a buffer of the specified capacity. emit(record) Appends the record to the buffer. If shouldFlush() returns true, calls flush() to process the buffer. flush() You can override this to implement custom flushing behavior. This version just zaps the buffer to empty. shouldFlush(record) Returns true if the buffer is up to capacity. This method can be overridden to implement custom flushing strategies.

venv.EnvBuilder.create()

create(env_dir) This method takes as required argument the path (absolute or relative to the current directory) of the target directory which is to contain the virtual environment. The create method will either create the environment in the specified directory, or raise an appropriate exception. The create method of the EnvBuilder class illustrates the hooks available for subclass customization: def create(self, env_dir): """ Create a virtualized Python environment in a directory.

email.iterators.typed_subpart_iterator()

email.iterators.typed_subpart_iterator(msg, maintype='text', subtype=None) This iterates over all the subparts of msg, returning only those subparts that match the MIME type specified by maintype and subtype. Note that subtype is optional; if omitted, then subpart MIME type matching is done only with the main type. maintype is optional too; it defaults to text. Thus, by default typed_subpart_iterator() returns each subpart that has a MIME type of text/*.

os.get_handle_inheritable()

os.get_handle_inheritable(handle) Get the “inheritable” flag of the specified handle (a boolean). Availability: Windows.

modulefinder.ModuleFinder

class modulefinder.ModuleFinder(path=None, debug=0, excludes=[], replace_paths=[]) This class provides run_script() and report() methods to determine the set of modules imported by a script. path can be a list of directories to search for modules; if not specified, sys.path is used. debug sets the debugging level; higher values make the class print debugging messages about what it’s doing. excludes is a list of module names to exclude from the analysis. replace_paths is a list of (oldpath, n

zipimport.zipimporter.prefix

prefix The subpath within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file.