From 372a7857d0346b481ec58626056409e3915f9cdc Mon Sep 17 00:00:00 2001 From: Albert O'Connor Date: Fri, 16 Oct 2015 11:05:15 -0400 Subject: [PATCH] Use six to support Python 2 and Python 3. --- poxx.py | 4 ++-- requirements.txt | 1 + setup.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/poxx.py b/poxx.py index d907615..3bb2637 100755 --- a/poxx.py +++ b/poxx.py @@ -20,7 +20,7 @@ import os.path import re import polib # from http://bitbucket.org/izi/polib -import HTMLParser +from six.moves import html_parser as HTMLParser VERSION_STR = '1.1.1' @@ -181,4 +181,4 @@ def diff_one_file(fname, canon_name): else: report_msg = munge_one_file(fname, options.blank, canon_name=options.canonical_po_file) - print report_msg + print(report_msg) diff --git a/requirements.txt b/requirements.txt index 23e5826..e6d5301 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ polib +six diff --git a/setup.py b/setup.py index b55c993..e159be0 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,7 @@ install_requires = [ 'polib', + 'six', ] test_requires = ['pytest']