nonblock.read
index

Copyright (c) 2015 Timothy Savannah under terms of LGPLv2. You should have received a copy of this LICENSE with this distribution.
 
read.py Contains pure-python functions for non-blocking reads in python

 
Functions
       
nonblock_read(stream, limit=None, forceMode=None)
nonblock_read - Read any data available on the given stream without blocking and regardless of newlines.
 
    @param stream - A stream (like a file object)
    @param limit <None/int> - Max number of bytes to read. If None or 0, will read as much data is available.
    @param forceMode <None/mode string> - If the stream object doesn't specify a "mode" param (like a socket), this function will assume the encoding as "bytes".
                                            If you want to force a stream mode, use "t" for text (str), or "b" for binary (bytes). Usually not required.
 
    @return - Any data available on the stream, or "None" if the stream was closed on the other side and all data has already been read.

 
Data
        __all__ = ('nonblock_read',)