asyncio.AbstractEventLoop.call_later()

AbstractEventLoop.call_later(delay, callback, *args) Arrange for the callback to be called after the given delay seconds (either an int or float). An instance of asyncio.Handle is returned, which can be used to cancel the callback. callback will be called exactly once per call to call_later(). If two callbacks are scheduled for exactly the same time, it is undefined which will be called first. The optional positional args will be passed to the callback when it is called. If you want the call

asyncio.AbstractEventLoop.call_exception_handler()

AbstractEventLoop.call_exception_handler(context) Call the current event loop exception handler. context is a dict object containing the following keys (new keys may be introduced later): ‘message’: Error message; ‘exception’ (optional): Exception object; ‘future’ (optional): asyncio.Future instance; ‘handle’ (optional): asyncio.Handle instance; ‘protocol’ (optional): Protocol instance; ‘transport’ (optional): Transport instance; ‘socket’ (optional): socket.socket instance. Note Note: thi

asyncio.AbstractEventLoop.call_at()

AbstractEventLoop.call_at(when, callback, *args) Arrange for the callback to be called at the given absolute timestamp when (an int or float), using the same time reference as AbstractEventLoop.time(). This method’s behavior is the same as call_later(). An instance of asyncio.Handle is returned, which can be used to cancel the callback. Use functools.partial to pass keywords to the callback.

asyncio.AbstractEventLoop.add_writer()

AbstractEventLoop.add_writer(fd, callback, *args) Start watching the file descriptor for write availability and then call the callback with specified arguments. Use functools.partial to pass keywords to the callback.

asyncio.AbstractEventLoop.add_signal_handler()

AbstractEventLoop.add_signal_handler(signum, callback, *args) Add a handler for a signal. Raise ValueError if the signal number is invalid or uncatchable. Raise RuntimeError if there is a problem setting up the handler. Use functools.partial to pass keywords to the callback.

asyncio.AbstractEventLoop.add_reader()

AbstractEventLoop.add_reader(fd, callback, *args) Start watching the file descriptor for read availability and then call the callback with specified arguments. Use functools.partial to pass keywords to the callback.

asyncio.AbstractEventLoop

class asyncio.AbstractEventLoop Abstract base class of event loops. This class is not thread safe.

asyncio

New in version 3.4. Source code: Lib/asyncio/ Note The asyncio package has been included in the standard library on a provisional basis. Backwards incompatible changes (up to and including removal of the module) may occur if deemed necessary by the core developers. This module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives. Here i

asynchat.async_chat.set_terminator()

async_chat.set_terminator(term) Sets the terminating condition to be recognized on the channel. term may be any of three types of value, corresponding to three different ways to handle incoming protocol data. term Description string Will call found_terminator() when the string is found in the input stream integer Will call found_terminator() when the indicated number of characters have been received None The channel continues to collect data forever Note that any data following the termina

asynchat.async_chat.push_with_producer()

async_chat.push_with_producer(producer) Takes a producer object and adds it to the producer fifo associated with the channel. When all currently-pushed producers have been exhausted the channel will consume this producer’s data by calling its more() method and send the data to the remote endpoint.