code: def _write_device(self):
          
          if not self._write_file:
              if not NIX:
                  return None
              try:
                  self._write_file = io.open(
                      self._character_device_path, 'wb')
              except PermissionError:
                  # Python 3
                  raise PermissionError(PERMISSIONS_ERROR_TEXT)
              except IOError as err:
                  # Python 2 only
                  if err.errno == 13:  # pragma: no cover
                      raise PermissionError(PERMISSIONS_ERROR_TEXT)
                  else:
                      raise
  
          return self._write_file
docs: The output device.