importlib.util.source_from_cache()

importlib.util.source_from_cache(path) Given the path to a PEP 3147 file name, return the associated source code file path. For example, if path is /foo/bar/__pycache__/baz.cpython-32.pyc the returned path would be /foo/bar/baz.py. path need not exist, however if it does not conform to PEP 3147 or PEP 488 format, a ValueError is raised. If sys.implementation.cache_tag is not defined, NotImplementedError is raised. New in version 3.4.

socketserver.BaseRequestHandler

class socketserver.BaseRequestHandler This is the superclass of all request handler objects. It defines the interface, given below. A concrete request handler subclass must define a new handle() method, and can override any of the other methods. A new instance of the subclass is created for each request. setup() Called before the handle() method to perform any initialization actions required. The default implementation does nothing. handle() This function must do all the work requir

curses.window.getstr()

window.getstr([y, x]) Read a string from the user, with primitive line editing capacity.

audioop.reverse()

audioop.reverse(fragment, width) Reverse the samples in a fragment and returns the modified fragment.

email.message.Message.add_header()

add_header(_name, _value, **_params) Extended header setting. This method is similar to __setitem__() except that additional header parameters can be provided as keyword arguments. _name is the header field to add and _value is the primary value for the header. For each item in the keyword argument dictionary _params, the key is taken as the parameter name, with underscores converted to dashes (since dashes are illegal in Python identifiers). Normally, the parameter will be added as key="val

asyncio.BaseTransport.get_extra_info()

get_extra_info(name, default=None) Return optional transport information. name is a string representing the piece of transport-specific information to get, default is the value to return if the information doesn’t exist. This method allows transport implementations to easily expose channel-specific information. socket: 'peername': the remote address to which the socket is connected, result of socket.socket.getpeername() (None on error) 'socket': socket.socket instance 'sockname': the socke

sqlite3.Connection.rollback()

rollback() This method rolls back any changes to the database since the last call to commit().

urllib.request.HTTPRedirectHandler.redirect_request()

HTTPRedirectHandler.redirect_request(req, fp, code, msg, hdrs, newurl) Return a Request or None in response to a redirect. This is called by the default implementations of the http_error_30*() methods when a redirection is received from the server. If a redirection should take place, return a new Request to allow http_error_30*() to perform the redirect to newurl. Otherwise, raise HTTPError if no other handler should try to handle this URL, or return None if you can’t but another handler mig

pathlib.Path.glob()

Path.glob(pattern) Glob the given pattern in the directory represented by this path, yielding all matching files (of any kind): >>> sorted(Path('.').glob('*.py')) [PosixPath('pathlib.py'), PosixPath('setup.py'), PosixPath('test_pathlib.py')] >>> sorted(Path('.').glob('*/*.py')) [PosixPath('docs/conf.py')] The “**” pattern means “this directory and all subdirectories, recursively”. In other words, it enables recursive globbing: >>> sorted(Path('.').glob('**/*.py'))

ssl.SSLSocket.getpeercert()

SSLSocket.getpeercert(binary_form=False) If there is no certificate for the peer on the other end of the connection, return None. If the SSL handshake hasn’t been done yet, raise ValueError. If the binary_form parameter is False, and a certificate was received from the peer, this method returns a dict instance. If the certificate was not validated, the dict is empty. If the certificate was validated, it returns a dict with several keys, amongst them subject (the principal for which the certi