Skip to content
Snippets Groups Projects
Commit 4c53ac1f authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Timo Koch
Browse files

[bin][fuzzycomparedata.py] Make compatible with python3

* use brackets for print function
parent 8788ca46
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!538Fix/make testscript compatible for python3
......@@ -5,6 +5,7 @@ Applicable for all style formats like e.g. csv files.
Fuzzy compares numbers by using absolute and/or relative difference comparison.
"""
from __future__ import print_function
import argparse
import csv
import json
......@@ -45,7 +46,7 @@ def compare_data(dataFile1, dataFile2, delimiter, absolute=1.5e-7, relative=1e-2
data2 = list(csv.reader(open(dataFile2, 'rb'), delimiter=delimiter))
if (len(data1) != len(data2)):
print "Length of data1 and data2 not equal: ref=", len(data1), ",new=", len(data2), ". Aborting!"
print("Length of data1 and data2 not equal: ref=", len(data1), ",new=", len(data2), ". Aborting!")
exit (3)
is_equal = True
......
......@@ -5,6 +5,7 @@ for all VTK style formats like VTK files. Fuzzy compares numbers by
using absolute and/or relative difference comparison.
"""
from __future__ import print_function
from __future__ import absolute_import
import argparse
import xml.etree.ElementTree as ET
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment