Revision 13463
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/lib/streams.py | ||
---|---|---|
50 | 50 |
|
51 | 51 |
def read_all(stream): return reduce(operator.add, StreamIter(stream), '') |
52 | 52 |
|
53 |
def file_get_contents(file_path): return read_all(open(file_path)) |
|
54 |
|
|
53 | 55 |
##### Timeouts |
54 | 56 |
|
55 | 57 |
class TimeoutInputStream(WrapStream): |
Also available in: Unified diff
lib/streams.py: added file_get_contents()