base64.b32decode()

base64.b32decode(s, casefold=False, map01=None) Decode the Base32 encoded bytes-like object or ASCII string s and return the decoded bytes. Optional casefold is a flag specifying whether a lowercase alphabet is acceptable as input. For security purposes, the default is False. RFC 3548 allows for optional mapping of the digit 0 (zero) to the letter O (oh), and for optional mapping of the digit 1 (one) to either the letter I (eye) or letter L (el). The optional argument map01 when not None, sp

unittest.TextTestRunner.run()

run(test) This method is the main public interface to the TextTestRunner. This method takes a TestSuite or TestCase instance. A TestResult is created by calling _makeResult() and the test(s) are run and the results printed to stdout.

ossaudiodev.oss_mixer_device.reccontrols()

oss_mixer_device.reccontrols() Returns a bitmask specifying the mixer controls that may be used to record. See the code example for controls() for an example of reading from a bitmask.

unittest.mock.MagicMock

class unittest.mock.MagicMock(*args, **kw) MagicMock is a subclass of Mock with default implementations of most of the magic methods. You can use MagicMock without having to configure the magic methods yourself. The constructor parameters have the same meaning as for Mock. If you use the spec or spec_set arguments then only magic methods that exist in the spec will be created.

xml.etree.ElementTree.Element.tag

tag A string identifying what kind of data this element represents (the element type, in other words).

subprocess.TimeoutExpired.output

output Output of the child process if it was captured by run() or check_output(). Otherwise, None.

fileinput.input()

fileinput.input(files=None, inplace=False, backup='', bufsize=0, mode='r', openhook=None) Create an instance of the FileInput class. The instance will be used as global state for the functions of this module, and is also returned to use during iteration. The parameters to this function will be passed along to the constructor of the FileInput class. The FileInput instance can be used as a context manager in the with statement. In this example, input is closed after the with statement is exite

symtable.SymbolTable.has_exec()

has_exec() Return True if the block uses exec.

email: Examples

Here are a few examples of how to use the email package to read, write, and send simple email messages, as well as more complex MIME messages. First, let’s see how to create and send a simple text message: # Import smtplib for the actual sending function import smtplib # Import the email modules we'll need from email.mime.text import MIMEText # Open a plain text file for reading. For this example, assume that # the text file contains only ASCII characters. with open(textfile) as fp: # Cr

cmd.Cmd.precmd()

Cmd.precmd(line) Hook method executed just before the command line line is interpreted, but after the input prompt is generated and issued. This method is a stub in Cmd; it exists to be overridden by subclasses. The return value is used as the command which will be executed by the onecmd() method; the precmd() implementation may re-write the command or simply return line unchanged.