code: def request_sensor_list(self, req, msg):
          
          exact, name_filter = construct_name_filter(msg.arguments[0]
                                                     if msg.arguments else None)
          sensors = [(name, sensor) for name, sensor in
                     sorted(self._sensors.iteritems()) if name_filter(name)]
  
          if exact and not sensors:
              return req.make_reply("fail", "Unknown sensor name.")
  
          self._send_sensor_value_informs(req, sensors)
          return req.make_reply("ok", str(len(sensors)))
docs: Request the list of sensors.
  
          The list of sensors is sent as a sequence of #sensor-list informs.
  
          Parameters
          ----------
          name : str, optional
              Name of the sensor to list (the default is to list all sensors).
              If name starts and ends with '/' it is treated as a regular
              expression and all sensors whose names contain the regular
              expression are returned.
  
          Informs
          -------
          name : str
              The name of the sensor being described.
          description : str
              Description of the named sensor.
          units : str
              Units for the value of the named sensor.
          type : str
              Type of the named sensor.
          params : list of str, optional
              Additional sensor parameters (type dependent). For integer and
              float sensors the additional parameters are the minimum and maximum
              sensor value. For discrete sensors the additional parameters are
              the allowed values. For all other types no additional parameters
              are sent.
  
          Returns
          -------
          success : {'ok', 'fail'}
              Whether sending the sensor list succeeded.
          informs : int
              Number of #sensor-list inform messages sent.
  
          Examples
          --------
          ::
  
              ?sensor-list
              #sensor-list psu.voltage PSU\_voltage. V float 0.0 5.0
              #sensor-list cpu.status CPU\_status. \@ discrete on off error
              ...
              !sensor-list ok 5
  
              ?sensor-list cpu.power.on
              #sensor-list cpu.power.on Whether\_CPU\_hase\_power. \@ boolean
              !sensor-list ok 1
  
              ?sensor-list /voltage/
              #sensor-list psu.voltage PSU\_voltage. V float 0.0 5.0
              #sensor-list cpu.voltage CPU\_voltage. V float 0.0 3.0
              !sensor-list ok 2