BaseException.with_traceback()

with_traceback(tb) This method sets tb as the new traceback for the exception and returns the exception object. It is usually used in exception handling code like this: try: ... except SomeException: tb = sys.exc_info()[2] raise OtherException(...).with_traceback(tb)

base64.urlsafe_b64decode()

base64.urlsafe_b64decode(s) Decode bytes-like object or ASCII string s using the URL- and filesystem-safe alphabet, which substitutes - instead of + and _ instead of / in the standard Base64 alphabet, and return the decoded bytes.

BaseException.args

args The tuple of arguments given to the exception constructor. Some built-in exceptions (like OSError) expect a certain number of arguments and assign a special meaning to the elements of this tuple, while others are usually called only with a single string giving an error message.

base64.standard_b64decode()

base64.standard_b64decode(s) Decode bytes-like object or ASCII string s using the standard Base64 alphabet and return the decoded bytes.

base64.encodestring()

base64.encodestring(s) Encode the bytes-like object s, which can contain arbitrary binary data, and return bytes containing the base64-encoded data, with newlines (b'\n') inserted after every 76 bytes of output, and ensuring that there is a trailing newline, as per RFC 2045 (MIME). encodestring is a deprecated alias.

base64.standard_b64encode()

base64.standard_b64encode(s) Encode bytes-like object s using the standard Base64 alphabet and return the encoded bytes.

base64.decodestring()

base64.decodestring(s) Decode the bytes-like object s, which must contain one or more lines of base64 encoded data, and return the decoded bytes. decodestring is a deprecated alias. New in version 3.1.

base64.encodebytes()

base64.encodebytes(s) base64.encodestring(s) Encode the bytes-like object s, which can contain arbitrary binary data, and return bytes containing the base64-encoded data, with newlines (b'\n') inserted after every 76 bytes of output, and ensuring that there is a trailing newline, as per RFC 2045 (MIME). encodestring is a deprecated alias.

base64.decodebytes()

base64.decodebytes(s) base64.decodestring(s) Decode the bytes-like object s, which must contain one or more lines of base64 encoded data, and return the decoded bytes. decodestring is a deprecated alias. New in version 3.1.

base64.encode()

base64.encode(input, output) Encode the contents of the binary input file and write the resulting base64 encoded data to the output file. input and output must be file objects. input will be read until input.read() returns an empty bytes object. encode() inserts a newline character (b'\n') after every 76 bytes of the output, as well as ensuring that the output always ends with a newline, as per RFC 2045 (MIME).