def write(self, s):
try:<EOL><INDENT>return self.handle.write(s)<EOL><DEDENT>except OSError:<EOL><INDENT>print()<EOL>print("<STR_LIT>")<EOL>print()<EOL>raise IOError<EOL><DEDENT>
Write wrapper.

Parameters
----------
s : bytes
  Bytes to write