master > master: code - saubereres Display
This commit is contained in:
parent
ab0fd15093
commit
e03f07d555
@ -13,9 +13,13 @@ from code.core.log import *;
|
|||||||
# METHODS display case
|
# METHODS display case
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
def DisplayCase(name: Any):
|
def DisplayStartOfCase(name: Any):
|
||||||
logPlain('');
|
DisplayBar(80);
|
||||||
logInfo('\033[92;1mCASE {}\033[0m'.format(name))
|
logPlain('\033[92;1mCASE {}\033[0m'.format(name))
|
||||||
|
return;
|
||||||
|
|
||||||
|
def DisplayEndOfCase():
|
||||||
|
DisplayBar(80);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -23,7 +27,6 @@ def DisplayCase(name: Any):
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
def DisplayStartOfAlgorithm(name: str, *_: Any, **inputs: Any):
|
def DisplayStartOfAlgorithm(name: str, *_: Any, **inputs: Any):
|
||||||
DisplayBar(80);
|
|
||||||
logPlain('Ausführung vom Algorithmus: \033[92;1m{}\033[0m'.format(name));
|
logPlain('Ausführung vom Algorithmus: \033[92;1m{}\033[0m'.format(name));
|
||||||
logPlain('INPUTS');
|
logPlain('INPUTS');
|
||||||
for varname, value in inputs.items():
|
for varname, value in inputs.items():
|
||||||
@ -34,7 +37,6 @@ def DisplayEndOfAlgorithm(*_: Any, **outputs: Any):
|
|||||||
logPlain('OUTPUTS:')
|
logPlain('OUTPUTS:')
|
||||||
for varname, value in outputs.items():
|
for varname, value in outputs.items():
|
||||||
logPlain(' - {} = {}'.format(varname, value))
|
logPlain(' - {} = {}'.format(varname, value))
|
||||||
DisplayBar(80);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
def DisplayMetrics():
|
def DisplayMetrics():
|
||||||
|
@ -47,7 +47,7 @@ def LoopThroughCases(path: str):
|
|||||||
config = ReadConfigFile(path);
|
config = ReadConfigFile(path);
|
||||||
cases = GetAttribute(config, 'parts', 'cases', expectedtype=list, default=[]);
|
cases = GetAttribute(config, 'parts', 'cases', expectedtype=list, default=[]);
|
||||||
for caseindex, case in enumerate(cases):
|
for caseindex, case in enumerate(cases):
|
||||||
DisplayCase(caseindex);
|
DisplayStartOfCase(caseindex);
|
||||||
|
|
||||||
command = GetAttribute(case, 'command', expectedtype=str, default='');
|
command = GetAttribute(case, 'command', expectedtype=str, default='');
|
||||||
inputs = GetAttribute(case, 'inputs', expectedtype=dict, default={});
|
inputs = GetAttribute(case, 'inputs', expectedtype=dict, default={});
|
||||||
@ -65,6 +65,7 @@ def LoopThroughCases(path: str):
|
|||||||
raise ValueError('Command \033[1m{}\033[0m nicht erkannt'.format(command));
|
raise ValueError('Command \033[1m{}\033[0m nicht erkannt'.format(command));
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logError(e);
|
logError(e);
|
||||||
|
DisplayEndOfCase();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Loading…
x
Reference in New Issue
Block a user