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.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.ac_out_buffer_size

ac_out_buffer_size The asynchronous output buffer size (default 4096).

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.ac_in_buffer_size

ac_in_buffer_size The asynchronous input buffer size (default 4096).

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.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.

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.

ast.NodeVisitor

class ast.NodeVisitor A node visitor base class that walks the abstract syntax tree and calls a visitor function for every node found. This function may return a value which is forwarded by the visit() method. This class is meant to be subclassed, with the subclass adding visitor methods. visit(node) Visit a node. The default implementation calls the method called self.visit_classname where classname is the name of the node class, or generic_visit() if that method doesn’t exist. gener