email.generator.Generator

class email.generator.Generator(outfp, mangle_from_=True, maxheaderlen=78, *, policy=None) The constructor for the Generator class takes a file-like object called outfp for an argument. outfp must support the write() method and be usable as the output file for the print() function. Optional mangle_from_ is a flag that, when True, puts a > character in front of any line in the body that starts exactly as From, i.e. From followed by a space at the beginning of the line. This is the only gua

importlib.machinery.SourceFileLoader.set_data()

set_data(path, data) Concrete implementation of importlib.abc.SourceLoader.set_data().

bytearray.lstrip()

bytearray.lstrip([chars]) Return a copy of the sequence with specified leading bytes removed. The chars argument is a binary sequence specifying the set of byte values to be removed - the name refers to the fact this method is usually used with ASCII characters. If omitted or None, the chars argument defaults to removing ASCII whitespace. The chars argument is not a prefix; rather, all combinations of its values are stripped: >>> b' spacious '.lstrip() b'spacious ' >>>

textwrap.TextWrapper.fix_sentence_endings

fix_sentence_endings (default: False) If true, TextWrapper attempts to detect sentence endings and ensure that sentences are always separated by exactly two spaces. This is generally desired for text in a monospaced font. However, the sentence detection algorithm is imperfect: it assumes that a sentence ending consists of a lowercase letter followed by one of '.', '!', or '?', possibly followed by one of '"' or "'", followed by a space. One problem with this is algorithm is that it is unable

fileinput.FileInput

class fileinput.FileInput(files=None, inplace=False, backup='', bufsize=0, mode='r', openhook=None) Class FileInput is the implementation; its methods filename(), fileno(), lineno(), filelineno(), isfirstline(), isstdin(), nextfile() and close() correspond to the functions of the same name in the module. In addition it has a readline() method which returns the next input line, and a __getitem__() method which implements the sequence behavior. The sequence must be accessed in strictly sequent

os.get_handle_inheritable()

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

pyclbr.readmodule_ex()

pyclbr.readmodule_ex(module, path=None) Like readmodule(), but the returned dictionary, in addition to mapping class names to class descriptor objects, also maps top-level function names to function descriptor objects. Moreover, if the module being read is a package, the key '__path__' in the returned dictionary has as its value a list which contains the package search path.

subprocess.Popen.communicate()

Popen.communicate(input=None, timeout=None) Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be data to be sent to the child process, or None, if no data should be sent to the child. The type of input must be bytes or, if universal_newlines was True, a string. communicate() returns a tuple (stdout_data, stderr_data). The data will be bytes or, if universal_newlines was

http.cookiejar.MozillaCookieJar

class http.cookiejar.MozillaCookieJar(filename, delayload=None, policy=None) A FileCookieJar that can load from and save cookies to disk in the Mozilla cookies.txt file format (which is also used by the Lynx and Netscape browsers). Note This loses information about RFC 2965 cookies, and also about newer or non-standard cookie-attributes such as port. Warning Back up your cookies before saving if you have cookies whose loss / corruption would be inconvenient (there are some subtleties whic

re.regex.search()

regex.search(string[, pos[, endpos]]) Scan through string looking for the first location where this regular expression produces a match, and return a corresponding match object. Return None if no position in the string matches the pattern; note that this is different from finding a zero-length match at some point in the string. The optional second parameter pos gives an index in the string where the search is to start; it defaults to 0. This is not completely equivalent to slicing the string