data_loader

Functions

class_to_instance_name(class_name, typ)

create_device_instance(class_name, instance_name, typ)

Ensures an instance with a specific name exists in globals().

read(file, typ)

Read the contents from .txt files

Module Contents

data_loader.class_to_instance_name(class_name, typ)
data_loader.create_device_instance(class_name, instance_name, typ)

Ensures an instance with a specific name exists in globals(). If not, searches through all scripts in the specified subpackage to find and load the class.

Parameters:
  • class_name – Name of the class as a string.

  • instance_name – Desired instance name in snake_case.

  • typ – Desired type ‘sim’ or ‘est’.

Returns:

The instance, or raises an ImportError if not found.

data_loader.read(file, typ: str)

Read the contents from .txt files

Parameters:

typ (str)