smtplib.SMTP.sendmail()

SMTP.sendmail(from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]) Send mail. The required arguments are an RFC 822 from-address string, a list of RFC 822 to-address strings (a bare string will be treated as a list with 1 address), and a message string. The caller may pass a list of ESMTP options (such as 8bitmime) to be used in MAIL FROM commands as mail_options. ESMTP options (such as DSN commands) that should be used with all RCPT commands can be passed as rcpt_options. (If you nee

asyncio.as_completed()

asyncio.as_completed(fs, *, loop=None, timeout=None) Return an iterator whose values, when waited for, are Future instances. Raises asyncio.TimeoutError if the timeout occurs before all Futures are done. Example: for f in as_completed(fs): result = yield from f # The 'yield from' may raise # Use result Note The futures f are not necessarily members of fs.

timeit.Timer

class timeit.Timer(stmt='pass', setup='pass', timer=, globals=None) Class for timing execution speed of small code snippets. The constructor takes a statement to be timed, an additional statement used for setup, and a timer function. Both statements default to 'pass'; the timer function is platform-dependent (see the module doc string). stmt and setup may also contain multiple statements separated by ; or newlines, as long as they don’t contain multi-line string literals. The statement will

curses.panel.Panel.window()

Panel.window() Returns the window object associated with the panel.

test.support.run_unittest()

test.support.run_unittest(*classes) Execute unittest.TestCase subclasses passed to the function. The function scans the classes for methods starting with the prefix test_ and executes the tests individually. It is also legal to pass strings as parameters; these should be keys in sys.modules. Each associated module will be scanned by unittest.TestLoader.loadTestsFromModule(). This is usually seen in the following test_main() function: def test_main(): support.run_unittest(__name__) This

ssl.enum_certificates()

ssl.enum_certificates(store_name) Retrieve certificates from Windows’ system cert store. store_name may be one of CA, ROOT or MY. Windows may provide additional cert stores, too. The function returns a list of (cert_bytes, encoding_type, trust) tuples. The encoding_type specifies the encoding of cert_bytes. It is either x509_asn for X.509 ASN.1 data or pkcs_7_asn for PKCS#7 ASN.1 data. Trust specifies the purpose of the certificate as a set of OIDS or exactly True if the certificate is trust

xmlrpc.server.CGIXMLRPCRequestHandler

class xmlrpc.server.CGIXMLRPCRequestHandler(allow_none=False, encoding=None, use_builtin_types=False) Create a new instance to handle XML-RPC requests in a CGI environment. The allow_none and encoding parameters are passed on to xmlrpc.client and control the XML-RPC responses that will be returned from the server. The use_builtin_types parameter is passed to the loads() function and controls which types are processed when date/times values or binary data are received; it defaults to false.

urllib.parse.urldefrag()

urllib.parse.urldefrag(url) If url contains a fragment identifier, return a modified version of url with no fragment identifier, and the fragment identifier as a separate string. If there is no fragment identifier in url, return url unmodified and an empty string. The return value is actually an instance of a subclass of tuple. This class has the following additional read-only convenience attributes: Attribute Index Value Value if not present url 0 URL with no fragment empty string fragment

math.fmod()

math.fmod(x, y) Return fmod(x, y), as defined by the platform C library. Note that the Python expression x % y may not return the same result. The intent of the C standard is that fmod(x, y) be exactly (mathematically; to infinite precision) equal to x - n*y for some integer n such that the result has the same sign as x and magnitude less than abs(y). Python’s x % y returns a result with the sign of y instead, and may not be exactly computable for float arguments. For example, fmod(-1e-100,

wave.Wave_write.writeframes()

Wave_write.writeframes(data) Write audio frames and make sure nframes is correct. It will raise an error if the output stream is not seekable and the total number of frames that have been written after data has been written does not match the previously set value for nframes. Changed in version 3.4: Any bytes-like object is now accepted.