def write(self, data, debug_info=None):
self.num_write_bytes += len(data)<EOL>if self.debug:<EOL><INDENT>if not debug_info:<EOL><INDENT>debug_info = str(len(data))<EOL><DEDENT>sys.stderr.write("<STR_LIT>" %(<EOL>self.__class__.__name__,<EOL>debug_info,<EOL>pyhsm.util.hexdump(data)<EOL>))<EOL><DEDENT>return self.ser.write(data)<EOL>
Write data to YHSM device.