smtplib.SMTP.send_message()

SMTP.send_message(msg, from_addr=None, to_addrs=None, mail_options=[], rcpt_options=[]) This is a convenience method for calling sendmail() with the message represented by an email.message.Message object. The arguments have the same meaning as for sendmail(), except that msg is a Message object. If from_addr is None or to_addrs is None, send_message fills those arguments with addresses extracted from the headers of msg as specified in RFC 5322: from_addr is set to the Sender field if it is p

tracemalloc.start()

tracemalloc.start(nframe: int=1) Start tracing Python memory allocations: install hooks on Python memory allocators. Collected tracebacks of traces will be limited to nframe frames. By default, a trace of a memory block only stores the most recent frame: the limit is 1. nframe must be greater or equal to 1. Storing more than 1 frame is only useful to compute statistics grouped by 'traceback' or to compute cumulative statistics: see the Snapshot.compare_to() and Snapshot.statistics() methods.

doctest.DocTestParser

class doctest.DocTestParser A processing class used to extract interactive examples from a string, and use them to create a DocTest object. DocTestParser defines the following methods: get_doctest(string, globs, name, filename, lineno) Extract all doctest examples from the given string, and collect them into a DocTest object. globs, name, filename, and lineno are attributes for the new DocTest object. See the documentation for DocTest for more information. get_examples(string, name=''

hmac.new()

hmac.new(key, msg=None, digestmod=None) Return a new hmac object. key is a bytes or bytearray object giving the secret key. If msg is present, the method call update(msg) is made. digestmod is the digest name, digest constructor or module for the HMAC object to use. It supports any name suitable to hashlib.new() and defaults to the hashlib.md5 constructor. Changed in version 3.4: Parameter key can be a bytes or bytearray object. Parameter msg can be of any type supported by hashlib. Paramet

sys.last_traceback

sys.last_traceback These three variables are not always defined; they are set when an exception is not handled and the interpreter prints an error message and a stack traceback. Their intended use is to allow an interactive user to import a debugger module and engage in post-mortem debugging without having to re-execute the command that caused the error. (Typical use is import pdb; pdb.pm() to enter the post-mortem debugger; see pdb module for more information.) The meaning of the variables

ssl.RAND_add()

ssl.RAND_add(bytes, entropy) Mix the given bytes into the SSL pseudo-random number generator. The parameter entropy (a float) is a lower bound on the entropy contained in string (so you can always use 0.0). See RFC 1750 for more information on sources of entropy. Changed in version 3.5: Writable bytes-like object is now accepted.

turtle.onkeypress()

turtle.onkeypress(fun, key=None) Parameters: fun – a function with no arguments or None key – a string: key (e.g. “a”) or key-symbol (e.g. “space”) Bind fun to key-press event of key if key is given, or to any key-press-event if no key is given. Remark: in order to be able to register key-events, TurtleScreen must have focus. (See method listen().) >>> def f(): ... fd(50) ... >>> screen.onkey(f, "Up") >>> screen.listen()

urllib.request.Request.selector

Request.selector The URI path. If the Request uses a proxy, then selector will be the full URL that is passed to the proxy.

array.array.extend()

array.extend(iterable) Append items from iterable to the end of the array. If iterable is another array, it must have exactly the same type code; if not, TypeError will be raised. If iterable is not an array, it must be iterable and its elements must be the right type to be appended to the array.

logging.Logger.hasHandlers()

Logger.hasHandlers() Checks to see if this logger has any handlers configured. This is done by looking for handlers in this logger and its parents in the logger hierarchy. Returns True if a handler was found, else False. The method stops searching up the hierarchy whenever a logger with the ‘propagate’ attribute set to False is found - that will be the last logger which is checked for the existence of handlers. New in version 3.2.