# setup_executable¶

tenpy.tools.misc.setup_executable(mod, run_defaults, identifier_list=None)[source]

Read command line arguments and turn into useable dicts.

Uses default values defined at: - model class for model_par - here for sim_par - executable file for run_par Alternatively, a model_defaults dictionary and identifier_list can be supplied without the model

NB: for setup_executable to work with a model class, the model class needs to define two things:
• defaults, a static (class level) dictionary with (key, value) pairs that have the name of the parameter (as string) as key, and the default value as value.

• identifier, a static (class level) list or other iterable with the names of the parameters to be used in filename identifiers.

Parameters
• mod (model | dict) – Model class (or instance) OR a dictionary containing model defaults

• run_defaults (dict) – default values for executable file parameters

• identifier_list (ieterable, optional) – variables

Returns

containing all parameters. args | namespace with raw arguments for some backwards compatibility with executables.

Return type

model_par, sim_par, run_par (dicts)