asynchat.async_chat.push()

async_chat.push(data) Pushes data on to the channel’s fifo to ensure its transmission. This is all you need to do to have the channel write the data out to the network, although it is possible to use your own producers in more complex schemes to implement encryption and chunking, for example.

asynchat.async_chat.get_terminator()

async_chat.get_terminator() Returns the current terminator for the channel.

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.

asynchat.async_chat.discard_buffers()

async_chat.discard_buffers() In emergencies this method will discard any data held in the input and/or output buffers and the producer fifo.

asynchat.async_chat.collect_incoming_data()

async_chat.collect_incoming_data(data) Called with data holding an arbitrary amount of received data. The default method, which must be overridden, raises a NotImplementedError exception.

asynchat.async_chat.close_when_done()

async_chat.close_when_done() Pushes a None on to the producer fifo. When this producer is popped off the fifo it causes the channel to be closed.

asynchat.async_chat.ac_out_buffer_size

ac_out_buffer_size The asynchronous output buffer size (default 4096).

asynchat.async_chat.ac_in_buffer_size

ac_in_buffer_size The asynchronous input buffer size (default 4096).

asynchat.async_chat

class asynchat.async_chat This class is an abstract subclass of asyncore.dispatcher. To make practical use of the code you must subclass async_chat, providing meaningful collect_incoming_data() and found_terminator() methods. The asyncore.dispatcher methods can be used, although not all make sense in a message/response context. Like asyncore.dispatcher, async_chat defines a set of events that are generated by an analysis of socket conditions after a select() call. Once the polling loop has b

ast.walk()

ast.walk(node) Recursively yield all descendant nodes in the tree starting at node (including node itself), in no specified order. This is useful if you only want to modify nodes in place and don’t care about the context.