From 76a9a93d72ad3ff21854f532d64aca42c72c1ebf Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 11 Sep 2023 22:06:09 +0200 Subject: confi reader --- run.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 run.py (limited to 'run.py') diff --git a/run.py b/run.py new file mode 100755 index 0000000..e1b6ad0 --- /dev/null +++ b/run.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import sys +import yaml + +FILE = 'config.yaml' +if len(sys.argv) > 1: + FILE = sys.argv[1] + +conf = None +with open(FILE, 'r') as f: + conf = yaml.safe_load(f) + +for plotter in conf['plotter']: + modname = plotter['module'] + del plotter['module'] + + mod = __import__(modname) + mod.run(**plotter) -- cgit v1.2.3