parameters: (self, input_node, path)
return_statement: return active
docstring: Read the parameters set on a block.
          We special case the "active" and "inactive" parameters and
          convert them directly into whether we include the block or
          not. Peacock will write out the "inactive" parameter for
          those blocks that are deselected and we don't want to have
          any problems with existing active or inactive parameters.
          Input:
              input_node[hit.Node]: Input node to read parameters from
              path[str]: Full path of the input_node
          Return:
              list[str]: Children of this node that are active
docstring_summary: Read the parameters set on a block.
          We special case the "active" and "inactive" parameters and
          convert them directly into whether we include the block or
          not. Peacock will write out the "inactive" parameter for
          those blocks that are deselected and we don't want to have
          any problems with existing active or inactive parameters.
          Input:
              input_node[hit.Node]: Input node to read parameters from
              path[str]: Full path of the input_node
          Return:
              list[str]: Children of this node that are active
docstring_tokens: Read the parameters set on a block . We special case the active and inactive parameters and convert them directly into whether we include the block or not . Peacock will write out the inactive parameter for those blocks that are deselected and we don t want to have any problems with existing active or inactive parameters . Input : input_node [ hit . Node ] : Input node to read parameters from path [ str ] : Full path of the input_node Return : list [ str ] : Children of this node that are active
function: def _readParameters(self, input_node, path):
          """
          Read the parameters set on a block.
          We special case the "active" and "inactive" parameters and
          convert them directly into whether we include the block or
          not. Peacock will write out the "inactive" parameter for
          those blocks that are deselected and we don't want to have
          any problems with existing active or inactive parameters.
          Input:
              input_node[hit.Node]: Input node to read parameters from
              path[str]: Full path of the input_node
          Return:
              list[str]: Children of this node that are active
          """
          active = []
          for child_node in input_node.children(node_type=hit.NodeType.Section):
              active.append(child_node.path())
  
          for param_node in input_node.children(node_type=hit.NodeType.Field):
              param_info = self.getParamInfo(path, param_node.path())
              if not param_info:
                  # must be a user added param
                  param_info = self.addUserParam(path, param_node.path(), param_node.raw())
              else:
                  param_info.value = param_node.raw()
              if param_info.name == "active":
                  active = param_info.value.split()
                  param_info.parent.removeUserParam("active", True)
              elif param_info.name == "inactive":
                  for inactive in param_info.value.split():
                      try:
                          active.remove(inactive)
                      except ValueError:
                          pass
                  # We don't want to write this out by default
                  param_info.parent.removeUserParam("inactive", True)
              else:
                  param_info.set_in_input_file = True
                  param_info.parent.changed_by_user = True
                  if param_info.name not in param_info.parent.parameters_write_first:
                      param_info.parent.parameters_write_first.append(param_info.name)
                  param_info.comments = self._getComments(param_node)
          return active
function_tokens: def _readParameters ( self , input_node , path ) : active = [ ] for child_node in input_node . children ( node_type = hit . NodeType . Section ) : active . append ( child_node . path ( ) ) for param_node in input_node . children ( node_type = hit . NodeType . Field ) : param_info = self . getParamInfo ( path , param_node . path ( ) ) if not param_info : # must be a user added param param_info = self . addUserParam ( path , param_node . path ( ) , param_node . raw ( ) ) else : param_info . value = param_node . raw ( ) if param_info . name == "active" : active = param_info . value . split ( ) param_info . parent . removeUserParam ( "active" , True ) elif param_info . name == "inactive" : for inactive in param_info . value . split ( ) : try : active . remove ( inactive ) except ValueError : pass # We don't want to write this out by default param_info . parent . removeUserParam ( "inactive" , True ) else : param_info . set_in_input_file = True param_info . parent . changed_by_user = True if param_info . name not in param_info . parent . parameters_write_first : param_info . parent . parameters_write_first . append ( param_info . name ) param_info . comments = self . _getComments ( param_node ) return active