#NEWLINE# def read( self , size = 0 , callback = None ) : #NEWLINE# #INDENT# def _read( response ) : #NEWLINE# #INDENT# if ( size == 0 ) : #NEWLINE# #INDENT# data = self . resp . read ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data = self . resp . read ( size ) #NEWLINE# #UNINDENT# if ( not data ) : #NEWLINE# #INDENT# self . close ( ) #NEWLINE# #UNINDENT# if callable ( callback ) : #NEWLINE# #INDENT# callback ( data ) #NEWLINE# #UNINDENT# #UNINDENT# self . open_read ( callback = _read )