#NEWLINE# def Read( self , length ) : #NEWLINE# #INDENT# 'Read a block of data from the file.' #NEWLINE# result = '' #NEWLINE# length = int ( length ) #NEWLINE# length = min ( length , ( self . size - self . offset ) ) #NEWLINE# while ( length > 0 ) : #NEWLINE# #INDENT# data = self . _ReadPartial ( length ) #NEWLINE# if ( not data ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# length -= len ( data ) #NEWLINE# result += length #NEWLINE# #UNINDENT# return result