Metadata-Version: 1.1
Name: eight
Version: 0.1.2
Summary: Python 2 to the power of 3. A lightweight porting helper library.
Home-page: https://github.com/kislyuk/eight
Author: Andrey Kislyuk
Author-email: kislyuk@gmail.com
License: Apache Software License
Description: eight: Python 2 to the power of 3
        =================================
        Eight is a Python module that provides a minimalist compatibility layer between Python 3 and 2. Eight lets you write
        code for Python 3.3+ while providing limited compatibility with Python 2.7 with no code changes.  Eight is inspired by
        `six <https://pythonhosted.org/six/>`_, `nine <https://github.com/nandoflorestan/nine>`_, and `python-future
        <https://github.com/PythonCharmers/python-future>`_, but is more lightweight, easier to use, and unambiguously biased
        toward Python 3 code: if you remove eight from your code, it will continue to function exactly as it did with eight on
        Python 3.
        
        To write code for Python 3 that is portable to Python 2, you may also want to read Armin Ronacher's excellent `Python 3
        porting guide <http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/>`_, as well as the official
        `porting guide <http://docs.python.org/3/howto/pyporting.html>`_.
        
        Writing ``from eight import *`` in your code is a no-op in Python 3. In Python 2, it binds a bunch of Python 3 names to
        their Python 2 equivalents. Also, if you need to import a module or module member that was renamed in Python 3, writing
        ``from eight import <module>`` will do the right thing (equivalent to ``import <module>`` on Python 3 and ``import
        <old_name> as <module>`` on Python 2). Finally, eight can optionally wrap your standard streams to use text, not bytes
        (see below).
        
        Installation
        ------------
        ::
        
            pip install eight
        
        Synopsis
        --------
        
        .. code-block:: python
        
            from eight import *
            from eight import queue
            from eight.collections import UserList, deque
        
        If you use ``print``, division, non-ASCII literals, or relative imports, you should also add this `future import
        <http://docs.python.org/3/library/__future__.html>`_ at the top of each source file:
        
        .. code-block:: python
        
            from __future__ import (print_function, division, unicode_literals, absolute_import)
        
        Wrapping stdio
        --------------
        Eight provides wrappers for ``sys.stdin``, ``sys.stdout``, and ``sys.stderr`` to make them (and methods that use them)
        behave like they do on Python 3. Specifically, in Python 3 these streams accept text data, and their ``.buffer`` attributes
        refer to the underlying streams that accept bytes. Eight uses the `io <http://docs.python.org/2/library/io.html>`_ module
        to do the same for you, but subclasses the TextIOWrapper class for ``sys.stdout`` and ``sys.stderr`` to coerce non-unicode
        input to unicode on Python 2 (otherwise, because of the Python 2 semantics, things like exception printing cease to work).
        
        To enable stdio wrapping, use the following:
        
        .. code-block:: python
        
            import eight
            eight.wrap_stdio()
        
        To revert the effects of this on any of the streams, use the detach method, e.g. ``sys.stdin = sys.stdin.detach()`` (but
        remember to condition this on ``eight.USING_PYTHON2``). See the `io module documentation
        <http://docs.python.org/2/library/io.html>`_ for more information.
        
        Acknowledgments
        ---------------
        `Python-future <https://github.com/PythonCharmers/python-future>`_ for doing a bunch of heavy lifting on backports of
        Python 3 features.
        
        Links
        -----
        * `Project home page (GitHub) <https://github.com/kislyuk/eight>`_
        * `Documentation (Read the Docs) <https://eight.readthedocs.org/en/latest/>`_
        * `Package distribution (PyPI) <https://pypi.python.org/pypi/eight/>`_
        
        Bugs
        ~~~~
        Please report bugs, issues, feature requests, etc. on `GitHub <https://github.com/kislyuk/eight/issues>`_.
        
        License
        -------
        Licensed under the terms of the `Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_.
        
        .. image:: https://travis-ci.org/kislyuk/eight.png
                :target: https://travis-ci.org/kislyuk/eight
        .. image:: https://coveralls.io/repos/kislyuk/eight/badge.png?branch=master
                :target: https://coveralls.io/r/kislyuk/eight?branch=master
        .. image:: https://pypip.in/v/eight/badge.png
                :target: https://crate.io/packages/eight
        .. image:: https://pypip.in/d/eight/badge.png
                :target: https://crate.io/packages/eight
        
Platform: MacOS X
Platform: Posix
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Software Development :: Libraries :: Python Modules
