code: def set_val(self, nval):
          
          with open(os.path.join(self._base, self._attr), 'w') as file_obj:
              file_obj.write(str(nval) + '\n')
docs: Sets new attribute's value.
  
          @param nval: replaces current value by nval.
          @type nval: int
          @raise IOError: if corresponding file in /proc/sys cannot be written.