code: def __write_to_character_device(self, event_list, timeval=None):
          
          # Remember the position of the stream
          pos = self._character_device.tell()
          # Go to the end of the stream
          self._character_device.seek(0, 2)
          # Write the new data to the end
          for event in event_list:
              self._character_device.write(event)
          # Add a sync marker
          sync = self.create_event_object("Sync", 0, 0, timeval)
          self._character_device.write(sync)
          # Put the stream back to its original position
          self._character_device.seek(pos)
docs: Emulate the Linux character device on other platforms such as
          Windows.