@interruptable
def xread(fh, size=(-1), encoding=None, errors=u'strict'):
 return decode(fh.read(size), encoding=encoding, errors=errors)

@ interruptable def xread ( fh , size = ( - 1 ) , encoding = None , errors = u'strict' ) : return decode ( fh . read ( size ) , encoding = encoding , errors = errors )
read from a filehandle and retry when interrupted .