class simple_producer( |
data[, buffer_size=512]) |
-
A simple_producer takes a chunk of data and an optional buffer size.
Repeated calls to its more() method yield successive chunks of the
data no larger than buffer_size.
-
Produces the next chunk of information from the producer, or returns the empty string.
-
Each channel maintains a fifo holding data which has been pushed by the
application but not yet popped for writing to the channel.
A fifo is a list used to hold data and/or producers until they are required.
If the list argument is provided then it should contain producers or
data items to be written to the channel.
-
Returns
True
iff the fifo is empty.
-
Returns the least-recently push()ed item from the fifo.
-
Adds the given data (which may be a string or a producer object) to the
producer fifo.
-
If the fifo is not empty, returns
True, first()
, deleting the popped
item. Returns False, None
for an empty fifo.
The asynchat module also defines one utility function, which may be
of use in network and textual analysis operations.
find_prefix_at_end( |
haystack, needle) |
-
Returns
True
if string haystack ends with any non-empty
prefix of string needle.
Release 2.5, documentation updated on 19th September, 2006.
See About this document... for information on suggesting changes.