view elpa/elpy-1.14.1/elpy/tests/compat.py @ 156:c745e2cc79ee

elpy: update along with direct deps
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 27 Feb 2017 12:17:38 -0500
parents elpa/elpy-1.12.0/elpy/tests/compat.py@55ceabc58fcc
children
line wrap: on
line source

"""Python 2/3 compatibility definitions.

These are used by the rest of Elpy to keep compatibility definitions
in one place.

"""

import sys


if sys.version_info >= (3, 0):
    PYTHON3 = True
    import builtins
    from io import StringIO
else:
    PYTHON3 = False
    import __builtin__ as builtins  # noqa
    from StringIO import StringIO  # noqa