# Path: textblob_de/compat.py
# PY2 = int(sys.version[0]) == 2
# PY26 = PY2 and int(sys.version_info[1]) < 7
#     def implements_to_string(cls):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
# def decode_string(v, encoding="utf-8"):
# def encode_string(v, encoding="utf-8"):
# def get_external_executable(_exec):
# def _shutil_which(cmd, mode=os.F_OK | os.X_OK, path=None):
#     def _access_check(fn, mode):
#     class metaclass(meta):


import os
import re
import subprocess
import time
from textblob_de.compat import _open, get_external_executable
                if format_as_code:
                    f.write("\t" + line.strip())
                    f.write("\n")
                else:
                    f.write(line)

        f.write("\n")
        if "README" in path_to_rst:
            f.write(get_rst_title("Credits", "^"))
            f.write(get_credits())

    print("\ncmd:{} in dir:{} --> RST generated:\n\t{}\n\n".format(
        help_cmd, cwd, path_to_rst))


def update_docs(readme=True, makefiles=True):
    """Update documentation (ready for publishing new release)

    Usually called by ``make docs``

    :param bool make_doc: generate DOC page from Makefile help messages

    """
    if readme:
        _pandoc = get_external_executable("pandoc")
        rst2markdown_github(os.path.join(_HERE, "README.rst"),
                            os.path.join(_HERE, "README.md"),
                            pandoc=_pandoc)

    if makefiles:

# Path: textblob_de/compat.py
# PY2 = int(sys.version[0]) == 2
# PY26 = PY2 and int(sys.version_info[1]) < 7
#     def implements_to_string(cls):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
# def decode_string(v, encoding="utf-8"):
# def encode_string(v, encoding="utf-8"):
# def get_external_executable(_exec):
# def _shutil_which(cmd, mode=os.F_OK | os.X_OK, path=None):
#     def _access_check(fn, mode):
#     class metaclass(meta):


# Path: prepare_docs.py
import os
import re
import subprocess
import time
from textblob_de.compat import _open, get_external_executable

                if format_as_code:
                    f.write("\t" + line.strip())
                    f.write("\n")
                else:
                    f.write(line)

        f.write("\n")
        if "README" in path_to_rst:
            f.write(get_rst_title("Credits", "^"))
            f.write(get_credits())

    print("\ncmd:{} in dir:{} --> RST generated:\n\t{}\n\n".format(
        help_cmd, cwd, path_to_rst))


def update_docs(readme=True, makefiles=True):
    """Update documentation (ready for publishing new release)

    Usually called by ``make docs``

    :param bool make_doc: generate DOC page from Makefile help messages

    """
    if readme:
        _pandoc = get_external_executable("pandoc")
        rst2markdown_github(os.path.join(_HERE, "README.rst"),
                            os.path.join(_HERE, "README.md"),
                            pandoc=_pandoc)

    if makefiles:

        _make = get_external_executable("make")