.. _f-py3to2: module ``pycode.py3to2`` ======================== .. inheritance-diagram:: pyquickhelper.pycode.py3to2 Short summary +++++++++++++ module ``pyquickhelper.pycode.py3to2`` Helper to convert a script written in Python 3 to Python 2 :githublink:`%|py|5` Classes +++++++ +----------------------------------------------------------------------------------+-------------------------------------------------------------------+ | class | truncated documentation | +==================================================================================+===================================================================+ | :class:`Convert3to2Exception ` | exception raised for an exception happening during the conversion | +----------------------------------------------------------------------------------+-------------------------------------------------------------------+ Functions +++++++++ +---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +===================================================================================================+===================================================================================================================================+ | :func:`py3to2_convert ` | converts a script into from python 3 to python 2 | +---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :func:`py3to2_convert_tree ` | Converts files in a folder and its subfolders from python 3 to python 2, the function only considers python script (verifying ... | +---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :func:`py3to2_future ` | checks that import ``from __future__ import unicode_literals`` is always present, the function assumes it is a python ... | +---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :func:`py3to2_imported_local_modules ` | See function :func:`py3to2_convert_tree` and documentation about parameter *unittest_modules*. | +---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :func:`py3to2_remove_raise_from ` | Removes expression such as: ``raise Exception ("...") from e``. The function is very basic. It should be done with a ... | +---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyquickhelper.pycode.py3to2 :members: :special-members: __init__ :show-inheritance: