imghdr.tests

imghdr.tests A list of functions performing the individual tests. Each function takes two arguments: the byte-stream and an open file-like object. When what() is called with a byte-stream, the file-like object will be None. The test function should return a string describing the image type if the test succeeded, or None if it failed.

importlib.machinery.SourceFileLoader.is_package()

is_package(fullname) Return true if path appears to be for a package.

ipaddress.IPv6Address.is_link_local

is_link_local New in version 3.4: is_global

asyncio.Future

class asyncio.Future(*, loop=None) This class is almost compatible with concurrent.futures.Future. Differences: result() and exception() do not take a timeout argument and raise an exception when the future isn’t done yet. Callbacks registered with add_done_callback() are always called via the event loop’s call_soon_threadsafe(). This class is not compatible with the wait() and as_completed() functions in the concurrent.futures package. This class is not thread safe. cancel() Cancel th

logging.handlers.NTEventLogHandler

class logging.handlers.NTEventLogHandler(appname, dllname=None, logtype='Application') Returns a new instance of the NTEventLogHandler class. The appname is used to define the application name as it appears in the event log. An appropriate registry entry is created using this name. The dllname should give the fully qualified pathname of a .dll or .exe which contains message definitions to hold in the log (if not specified, 'win32service.pyd' is used - this is installed with the Win32 extensi

logging.getLogger()

logging.getLogger(name=None) Return a logger with the specified name or, if name is None, return a logger which is the root logger of the hierarchy. If specified, the name is typically a dot-separated hierarchical name like ‘a’, ‘a.b’ or ‘a.b.c.d’. Choice of these names is entirely up to the developer who is using logging. All calls to this function with a given name return the same logger instance. This means that logger instances never need to be passed between different parts of an applic

unittest.mock.Mock.assert_has_calls()

assert_has_calls(calls, any_order=False) assert the mock has been called with the specified calls. The mock_calls list is checked for the calls. If any_order is false (the default) then the calls must be sequential. There can be extra calls before or after the specified calls. If any_order is true then the calls can be in any order, but they must all appear in mock_calls. >>> mock = Mock(return_value=None) >>> mock(1) >>> mock(2) >>> mock(3) >>> m

UnicodeError.reason

reason A string describing the specific codec error.

syslog.openlog()

syslog.openlog([ident[, logoption[, facility]]]) Logging options of subsequent syslog() calls can be set by calling openlog(). syslog() will call openlog() with no arguments if the log is not currently open. The optional ident keyword argument is a string which is prepended to every message, and defaults to sys.argv[0] with leading path components stripped. The optional logoption keyword argument (default is 0) is a bit field – see below for possible values to combine. The optional facility

asynchat.async_chat.found_terminator()

async_chat.found_terminator() Called when the incoming data stream matches the termination condition set by set_terminator(). The default method, which must be overridden, raises a NotImplementedError exception. The buffered input data should be available via an instance attribute.