move print_output function from runner.py to utils.py

This commit is contained in:
debugtalk
2017-09-19 23:27:38 +08:00
parent a2607569bd
commit 0dad384f01
2 changed files with 19 additions and 16 deletions

View File

@@ -359,3 +359,16 @@ def override_variables_binds(variable_binds, new_mapping):
convert_to_order_dict(variable_binds),
new_mapping
)
def print_output(output):
if not output:
return
print("\n================== Output ==================")
print('{:<10}: {:<}'.format("Variable", "Value"))
print('{:<10}: {:<}'.format("--------", "-----"))
for variable, value in output.items():
print('{:<10}: {:<}'.format(variable, value))
print("============================================\n")