wsgiref.util.FileWrapper

class wsgiref.util.FileWrapper(filelike, blksize=8192) A wrapper to convert a file-like object to an iterator. The resulting objects support both __getitem__() and __iter__() iteration styles, for compatibility with Python 2.1 and Jython. As the object is iterated over, the optional blksize parameter will be repeatedly passed to the filelike object’s read() method to obtain bytestrings to yield. When read() returns an empty bytestring, iteration is ended and is not resumable. If filelike has

sys.tracebacklimit

sys.tracebacklimit When this variable is set to an integer value, it determines the maximum number of levels of traceback information printed when an unhandled exception occurs. The default is 1000. When set to 0 or less, all traceback information is suppressed and only the exception type and value are printed.

email.utils.format_datetime()

email.utils.format_datetime(dt, usegmt=False) Like formatdate, but the input is a datetime instance. If it is a naive datetime, it is assumed to be “UTC with no information about the source timezone”, and the conventional -0000 is used for the timezone. If it is an aware datetime, then the numeric timezone offset is used. If it is an aware timezone with offset zero, then usegmt may be set to True, in which case the string GMT is used instead of the numeric timezone offset. This provides a wa

json.JSONDecodeError.lineno

lineno The line corresponding to pos.

tkinter.tix.tixCommand.tix_getimage()

tixCommand.tix_getimage(self, name) Locates an image file of the name name.xpm, name.xbm or name.ppm in one of the bitmap directories (see the tix_addbitmapdir() method above). If more than one file with the same name (but different extensions) exist, then the image type is chosen according to the depth of the X display: xbm images are chosen on monochrome displays and color images are chosen on color displays. By using tix_getimage(), you can avoid hard coding the pathnames of the image fil

multiprocessing.pool.Pool.map_async()

map_async(func, iterable[, chunksize[, callback[, error_callback]]]) A variant of the map() method which returns a result object. If callback is specified then it should be a callable which accepts a single argument. When the result becomes ready callback is applied to it, that is unless the call failed, in which case the error_callback is applied instead. If error_callback is specified then it should be a callable which accepts a single argument. If the target function fails, then the error

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

email.contentmanager.ContentManager

class email.contentmanager.ContentManager Base class for content managers. Provides the standard registry mechanisms to register converters between MIME content and other representations, as well as the get_content and set_content dispatch methods. get_content(msg, *args, **kw) Look up a handler function based on the mimetype of msg (see next paragraph), call it, passing through all arguments, and return the result of the call. The expectation is that the handler will extract the payload

importlib.machinery.PathFinder.find_module()

classmethod find_module(fullname, path=None) A legacy wrapper around find_spec(). Deprecated since version 3.4: Use find_spec() instead.

pickle.load()

pickle.load(file, *, fix_imports=True, encoding="ASCII", errors="strict") Read a pickled object representation from the open file object file and return the reconstituted object hierarchy specified therein. This is equivalent to Unpickler(file).load(). The protocol version of the pickle is detected automatically, so no protocol argument is needed. Bytes past the pickled object’s representation are ignored. The argument file must have two methods, a read() method that takes an integer argumen