From adad0a0a7797686030083feafd4d46b153dbfcd8 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 3 Aug 2013 13:24:10 -0400 Subject: - [bug] The Babel plugin has been repaired to work on Python 3. --- mako/compat.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mako/compat.py') diff --git a/mako/compat.py b/mako/compat.py index 3a4742d..5e9c201 100644 --- a/mako/compat.py +++ b/mako/compat.py @@ -18,6 +18,8 @@ if py3k: binary_type = bytes text_type = str + from io import BytesIO as byte_buffer + def u(s): return s @@ -30,6 +32,9 @@ else: from cStringIO import StringIO except: from StringIO import StringIO + + byte_buffer = StringIO + from urllib import quote_plus, unquote_plus from htmlentitydefs import codepoint2name, name2codepoint string_types = basestring, -- cgit v1.2.3