def _py_code_variables(lines, executable, lparams, tab):
    """Adds the variable code lines for all the parameters in the executable.

    :arg lparams: a list of the local variable declarations made so far that need to be passed
      to the executable when it is called.
    """
    allparams = executable.ordered_parameters
    if type(executable).__name__ == "Function":
        allparams = allparams + [executable]

    for p in allparams:
        _py_code_parameter(lines, p, "invar", lparams, tab)
        if p.direction == "(out)":
            #We need to reverse the order of the indices to match the fortran code
            #generation of the wrapper.
            _py_code_parameter(lines, p, "outvar", lparams, tab)
            _py_code_parameter(lines, p, "indices", lparams, tab)
        else:
            _py_code_parameter(lines, p, "indices", lparams, tab)
            _py_code_parameter(lines, p, "outvar", lparams, tab)
def _py_code_variables ( lines , executable , lparams , tab ) : allparams = executable . ordered_parameters if type ( executable ) . __name__ == "Function" : allparams = allparams + [ executable ] for p in allparams : _py_code_parameter ( lines , p , "invar" , lparams , tab ) if p . direction == "(out)" : _py_code_parameter ( lines , p , "outvar" , lparams , tab ) _py_code_parameter ( lines , p , "indices" , lparams , tab ) else : _py_code_parameter ( lines , p , "indices" , lparams , tab ) _py_code_parameter ( lines , p , "outvar" , lparams , tab )
Adds the variable code lines for all the parameters in the executable.

    :arg lparams: a list of the local variable declarations made so far that need to be passed
      to the executable when it is called.