# Path: ephypype/externals/click/_compat.py
# PY2 = sys.version_info[0] == 2
# CYGWIN = sys.platform.startswith('cygwin')
# APP_ENGINE = ('APPENGINE_RUNTIME' in os.environ and
#               'Development/' in os.environ['SERVER_SOFTWARE'])
# WIN = sys.platform.startswith('win') and not APP_ENGINE
# DEFAULT_COLUMNS = 80
#     DEFAULT_COLUMNS = 79
# def get_filesystem_encoding():
# def _make_text_stream(stream, encoding, errors,
#                       force_readable=False, force_writable=False):
# def is_ascii_encoding(encoding):
# def get_best_encoding(stream):
#     def __init__(self, stream, encoding, errors,
#                  force_readable=False, force_writable=False, **extra):
#         def write(self, x):
#         def writelines(self, lines):
#     def __del__(self):
#     def isatty(self):
#     def __init__(self, stream, force_readable=False, force_writable=False):
#     def __getattr__(self, name):
#     def read1(self, size):
#     def readable(self):
#     def writable(self):
#     def seekable(self):
#     def is_bytes(x):
#     def set_binary_mode(f):
#         def set_binary_mode(f):
#         def set_binary_mode(f):
#     def isidentifier(x):
#     def get_binary_stdin():
#     def get_binary_stdout():
#     def get_binary_stderr():
#     def get_text_stdin(encoding=None, errors=None):
#     def get_text_stdout(encoding=None, errors=None):
#     def get_text_stderr(encoding=None, errors=None):
#     def filename_to_ui(value):
#     def is_bytes(x):
#     def _is_binary_reader(stream, default=False):
#     def _is_binary_writer(stream, default=False):
#     def _find_binary_reader(stream):
#     def _find_binary_writer(stream):
#     def _stream_is_misconfigured(stream):
#     def _is_compatible_text_stream(stream, encoding, errors):
#     def _force_correct_text_reader(text_reader, encoding, errors,
#                                    force_readable=False):
#     def _force_correct_text_writer(text_writer, encoding, errors,
#                                    force_writable=False):
#     def get_binary_stdin():
#     def get_binary_stdout():
#     def get_binary_stderr():
#     def get_text_stdin(encoding=None, errors=None):
#     def get_text_stdout(encoding=None, errors=None):
#     def get_text_stderr(encoding=None, errors=None):
#     def filename_to_ui(value):
# def get_streerror(e, default=None):
# def open_stream(filename, mode='r', encoding=None, errors='strict',
#                 atomic=False):
#     def __init__(self, f, tmp_filename, real_filename):
#     def name(self):
#     def close(self, delete=False):
#     def __getattr__(self, name):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_value, tb):
#     def __repr__(self):
# def strip_ansi(value):
# def should_strip_ansi(stream=None, color=None):
#     def _get_argv_encoding():
#         def raw_input(prompt=''):
#         def auto_wrap_for_ansi(stream, color=None):
#             def _safe_write(s):
#         def get_winterm_size():
#     def _get_argv_encoding():
# def term_len(x):
# def isatty(stream):
# def _make_cached_stream_func(src_func, wrapper_func):
#     def func():
# class _NonClosingTextIOWrapper(io.TextIOWrapper):
# class _FixupStream(object):
# class _AtomicFile(object):


import io
import os
import sys
import zlib
import time
import ctypes
import msvcrt
from ._compat import _NonClosingTextIOWrapper, text_type, PY2
from ctypes import byref, POINTER, c_int, c_char, c_char_p, \
     c_void_p, py_object, c_ssize_t, c_ulong, windll, WINFUNCTYPE
    from ctypes import pythonapi
from ctypes.wintypes import LPWSTR, LPCWSTR
            return 'ERROR_NOT_ENOUGH_MEMORY'
        return 'Windows error %s' % errno

    def write(self, b):
        bytes_to_be_written = len(b)
        buf = get_buffer(b)
        code_units_to_be_written = min(bytes_to_be_written,
                                       MAX_BYTES_WRITTEN) // 2
        code_units_written = c_ulong()

        WriteConsoleW(self.handle, buf, code_units_to_be_written,
                      byref(code_units_written), None)
        bytes_written = 2 * code_units_written.value

        if bytes_written == 0 and bytes_to_be_written > 0:
            raise OSError(self._get_error_message(GetLastError()))
        return bytes_written


class ConsoleStream(object):

    def __init__(self, text_stream, byte_stream):
        self._text_stream = text_stream
        self.buffer = byte_stream

    @property
    def name(self):
        return self.buffer.name

    def write(self, x):

# Path: ephypype/externals/click/_compat.py
# PY2 = sys.version_info[0] == 2
# CYGWIN = sys.platform.startswith('cygwin')
# APP_ENGINE = ('APPENGINE_RUNTIME' in os.environ and
#               'Development/' in os.environ['SERVER_SOFTWARE'])
# WIN = sys.platform.startswith('win') and not APP_ENGINE
# DEFAULT_COLUMNS = 80
#     DEFAULT_COLUMNS = 79
# def get_filesystem_encoding():
# def _make_text_stream(stream, encoding, errors,
#                       force_readable=False, force_writable=False):
# def is_ascii_encoding(encoding):
# def get_best_encoding(stream):
#     def __init__(self, stream, encoding, errors,
#                  force_readable=False, force_writable=False, **extra):
#         def write(self, x):
#         def writelines(self, lines):
#     def __del__(self):
#     def isatty(self):
#     def __init__(self, stream, force_readable=False, force_writable=False):
#     def __getattr__(self, name):
#     def read1(self, size):
#     def readable(self):
#     def writable(self):
#     def seekable(self):
#     def is_bytes(x):
#     def set_binary_mode(f):
#         def set_binary_mode(f):
#         def set_binary_mode(f):
#     def isidentifier(x):
#     def get_binary_stdin():
#     def get_binary_stdout():
#     def get_binary_stderr():
#     def get_text_stdin(encoding=None, errors=None):
#     def get_text_stdout(encoding=None, errors=None):
#     def get_text_stderr(encoding=None, errors=None):
#     def filename_to_ui(value):
#     def is_bytes(x):
#     def _is_binary_reader(stream, default=False):
#     def _is_binary_writer(stream, default=False):
#     def _find_binary_reader(stream):
#     def _find_binary_writer(stream):
#     def _stream_is_misconfigured(stream):
#     def _is_compatible_text_stream(stream, encoding, errors):
#     def _force_correct_text_reader(text_reader, encoding, errors,
#                                    force_readable=False):
#     def _force_correct_text_writer(text_writer, encoding, errors,
#                                    force_writable=False):
#     def get_binary_stdin():
#     def get_binary_stdout():
#     def get_binary_stderr():
#     def get_text_stdin(encoding=None, errors=None):
#     def get_text_stdout(encoding=None, errors=None):
#     def get_text_stderr(encoding=None, errors=None):
#     def filename_to_ui(value):
# def get_streerror(e, default=None):
# def open_stream(filename, mode='r', encoding=None, errors='strict',
#                 atomic=False):
#     def __init__(self, f, tmp_filename, real_filename):
#     def name(self):
#     def close(self, delete=False):
#     def __getattr__(self, name):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_value, tb):
#     def __repr__(self):
# def strip_ansi(value):
# def should_strip_ansi(stream=None, color=None):
#     def _get_argv_encoding():
#         def raw_input(prompt=''):
#         def auto_wrap_for_ansi(stream, color=None):
#             def _safe_write(s):
#         def get_winterm_size():
#     def _get_argv_encoding():
# def term_len(x):
# def isatty(stream):
# def _make_cached_stream_func(src_func, wrapper_func):
#     def func():
# class _NonClosingTextIOWrapper(io.TextIOWrapper):
# class _FixupStream(object):
# class _AtomicFile(object):


# Path: ephypype/externals/click/_winconsole.py
import io
import os
import sys
import zlib
import time
import ctypes
import msvcrt
from ._compat import _NonClosingTextIOWrapper, text_type, PY2
from ctypes import byref, POINTER, c_int, c_char, c_char_p, \
     c_void_p, py_object, c_ssize_t, c_ulong, windll, WINFUNCTYPE
    from ctypes import pythonapi
from ctypes.wintypes import LPWSTR, LPCWSTR

            return 'ERROR_NOT_ENOUGH_MEMORY'
        return 'Windows error %s' % errno

    def write(self, b):
        bytes_to_be_written = len(b)
        buf = get_buffer(b)
        code_units_to_be_written = min(bytes_to_be_written,
                                       MAX_BYTES_WRITTEN) // 2
        code_units_written = c_ulong()

        WriteConsoleW(self.handle, buf, code_units_to_be_written,
                      byref(code_units_written), None)
        bytes_written = 2 * code_units_written.value

        if bytes_written == 0 and bytes_to_be_written > 0:
            raise OSError(self._get_error_message(GetLastError()))
        return bytes_written


class ConsoleStream(object):

    def __init__(self, text_stream, byte_stream):
        self._text_stream = text_stream
        self.buffer = byte_stream

    @property
    def name(self):
        return self.buffer.name

    def write(self, x):

        if isinstance(x, text_type):