def read(self, size):
try:<EOL><INDENT>return self.handle.read(size)<EOL><DEDENT>except (OSError, serial.SerialException):<EOL><INDENT>print()<EOL>print("<STR_LIT>")<EOL>print()<EOL>self.handle.close()<EOL>raise IOError<EOL><DEDENT>
Read wrapper.

Parameters
----------
size : int
  Number of bytes to read.