From efc4099059fb854115f4582d3c35586300e14ca9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 21 Mar 2016 14:17:30 -0500 Subject: [PATCH] Use six unichr() in string_histogram() --- pytools/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytools/__init__.py b/pytools/__init__.py index 611130b..f4271f5 100644 --- a/pytools/__init__.py +++ b/pytools/__init__.py @@ -1393,9 +1393,9 @@ def string_histogram(iterable, min_value=None, max_value=None, full = int(floor(scaled)) eighths = int(ceil((scaled-full)*8)) if eighths: - return full*unichr(0x2588) + unichr(0x2588+(8-eighths)) + return full*six.unichr(0x2588) + six.unichr(0x2588+(8-eighths)) else: - return full*unichr(0x2588) + return full*six.unichr(0x2588) else: def format_bar(cnt): return int(ceil(cnt*width/max_count))*"#" -- GitLab