diff --git a/alyn/__init__.py b/alyn/__init__.py index 1b430f8..d8b8d4b 100644 --- a/alyn/__init__.py +++ b/alyn/__init__.py @@ -1,3 +1,4 @@ """ Import required modules""" from deskew import * from skew_detect import * +from __future__ import print_function diff --git a/alyn/deskew.py b/alyn/deskew.py index 029be4f..605b601 100755 --- a/alyn/deskew.py +++ b/alyn/deskew.py @@ -3,7 +3,7 @@ import numpy as np import matplotlib.pyplot as plt -from skew_detect import SkewDetect +from .skew_detect import SkewDetect from skimage import io from skimage.transform import rotate diff --git a/alyn/skew_detect.py b/alyn/skew_detect.py index 2612102..f1fb2e4 100755 --- a/alyn/skew_detect.py +++ b/alyn/skew_detect.py @@ -77,7 +77,7 @@ def compare_sum(self, value): def display(self, data): for i in data: - print i + ": " + str(data[i]) + print(i + ": " + str(data[i])) def calculate_deviation(self, angle): @@ -104,7 +104,7 @@ def run(self): if self.batch_path: self.batch_process() else: - print "Invalid input, nothing to process." + print("Invalid input, nothing to process.") else: self.process_single_file()