nonblock.read
index

Copyright (c) 2015-2016 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

 
Modules
       
select

 
Functions
       
nonblock_read(stream, limit=None, forceMode=None)
nonblock_read - Read any data available on the given stream (file, socket, etc) without blocking and regardless of newlines.
 
    @param stream <object> - A stream (like a file object or a socket)
    @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> - Default None. Will be autodetected if None. If you want to explicitly force a mode, provide 'b' for binary (bytes) or 't' for text (Str). This determines the return type.
 
    @return <str or bytes depending on stream's mode> - 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',)