Index: leahi_dialin/utils/__init__.py =================================================================== diff -u -r0798c12fdcbc4a3bd986b83c220013d08321dd66 -re45b20cdc5d4c5dcff8cef530b173ca94cb2e422 --- leahi_dialin/utils/__init__.py (.../__init__.py) (revision 0798c12fdcbc4a3bd986b83c220013d08321dd66) +++ leahi_dialin/utils/__init__.py (.../__init__.py) (revision e45b20cdc5d4c5dcff8cef530b173ca94cb2e422) @@ -1,3 +1,27 @@ from .base import * from .singleton import * from .enums import * + +file_name = "config.json" +sw_key = "SW" +config = {} +ok: bool = False +module_name = os.path.basename(os.getcwd()) + +try: + with open(file_name, 'r') as file: config = json.load(file); ok = config[sw_key] +except FileNotFoundError: pass +except KeyError : print(f"Error ({module_name}): The key '{sw_key}' was not found." ) +except Exception as e : print(f"Error ({module_name}): An unexpected error occurred: {e}" ) + +if ok: + print(f"{sw_key} is set to bypass the auto imports.") +else: + from .conversions import * + from .data_logger import DataLogger + from .checks import * + from .helpers import * + from .excel_ops import * + from .nv_ops_utils import * + YES = 1 + NO = 0