Project

General

Profile

« Previous | Next » 

Revision 13463

lib/streams.py: added file_get_contents()

View differences:

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