DEMutilities. variables_from_files

In order to be able to use this module import it like this:

import DEMutilities.variables_from_files
#or assign it to a shorter name
import DEMutilities.variables_from_files as var

StringToDictTransformer

class DEMutilities.variables_from_files.StringToDictTransformer

Bases: ast.NodeTransformer

StringToDictTransformer(name, parent, **kwargs)
ALLOWED_NAMES = set(['True', 'None', 'False', 'u'])
ALLOWED_NODE_TYPES = set(['FloorDiv', 'Name', 'Tuple', 'BinOp', 'List', 'Add', 'Num', 'Dict', 'Str', 'BitXor', 'Div', 'Mod', 'Expression', 'Mult', 'Sub'])
visit_Name(node)

VariableExtractor

class DEMutilities.variables_from_files.VariableExtractor

Bases: object

VariableExtractor(name, parent, **kwargs)
add_parameters_to_global(sim, separate_containers, overal_param_container)
extract_dict_from_path(param_dict_path)
find_parameter_dict(list_parameter_dict_filenames, folder)
return_variable_value(param_container_name, variable_name)
transformer = <DEMutilities.variables_from_files.StringToDictTransformer object>
DEMutilities.variables_from_files.container_name_from_filename(filename)
DEMutilities.variables_from_files.create_one_global_parameter(sim, variable_name, variable_value, parameter_dict_name, overal_param_container=0)
DEMutilities.variables_from_files.extract_param_dict(parameter_dict_filename, folder='')
DEMutilities.variables_from_files.import_param_and_make_cm_dict(sim, cm_dict_raw, folder)
DEMutilities.variables_from_files.make_global_parameters(sim, list_parameter_dict_filenames, folder='', separate_containers=False, overal_param_container=0)