$93 GRAYBYTE WORDPRESS FILE MANAGER $96

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/usr/lib/python2.7/site-packages/pip/_vendor/colorama/

HOME
Current File : /usr/lib/python2.7/site-packages/pip/_vendor/colorama//initialise.py
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import atexit
import contextlib
import sys

from .ansitowin32 import AnsiToWin32


orig_stdout = None
orig_stderr = None

wrapped_stdout = None
wrapped_stderr = None

atexit_done = False


def reset_all():
    if AnsiToWin32 is not None:    # Issue #74: objects might become None at exit
        AnsiToWin32(orig_stdout).reset_all()


def init(autoreset=False, convert=None, strip=None, wrap=True):

    if not wrap and any([autoreset, convert, strip]):
        raise ValueError('wrap=False conflicts with any other arg=True')

    global wrapped_stdout, wrapped_stderr
    global orig_stdout, orig_stderr

    orig_stdout = sys.stdout
    orig_stderr = sys.stderr

    if sys.stdout is None:
        wrapped_stdout = None
    else:
        sys.stdout = wrapped_stdout = \
            wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
    if sys.stderr is None:
        wrapped_stderr = None
    else:
        sys.stderr = wrapped_stderr = \
            wrap_stream(orig_stderr, convert, strip, autoreset, wrap)

    global atexit_done
    if not atexit_done:
        atexit.register(reset_all)
        atexit_done = True


def deinit():
    if orig_stdout is not None:
        sys.stdout = orig_stdout
    if orig_stderr is not None:
        sys.stderr = orig_stderr


@contextlib.contextmanager
def colorama_text(*args, **kwargs):
    init(*args, **kwargs)
    try:
        yield
    finally:
        deinit()


def reinit():
    if wrapped_stdout is not None:
        sys.stdout = wrapped_stdout
    if wrapped_stderr is not None:
        sys.stderr = wrapped_stderr


def wrap_stream(stream, convert, strip, autoreset, wrap):
    if wrap:
        wrapper = AnsiToWin32(stream,
            convert=convert, strip=strip, autoreset=autoreset)
        if wrapper.should_wrap():
            stream = wrapper.stream
    return stream




Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 8.23 PM
root / root
0755
__init__.py
0.234 KB
21 Apr 2022 6.08 PM
root / root
0644
__init__.pyc
0.472 KB
21 Apr 2022 6.08 PM
root / root
0644
__init__.pyo
0.472 KB
21 Apr 2022 6.08 PM
root / root
0644
ansi.py
2.465 KB
21 Apr 2022 6.08 PM
root / root
0644
ansi.pyc
4.328 KB
21 Apr 2022 6.08 PM
root / root
0644
ansi.pyo
4.328 KB
21 Apr 2022 6.08 PM
root / root
0644
ansitowin32.py
9.441 KB
21 Apr 2022 6.08 PM
root / root
0644
ansitowin32.pyc
9.134 KB
21 Apr 2022 6.08 PM
root / root
0644
ansitowin32.pyo
9.134 KB
21 Apr 2022 6.08 PM
root / root
0644
initialise.py
1.872 KB
21 Apr 2022 6.08 PM
root / root
0644
initialise.pyc
2.299 KB
21 Apr 2022 6.08 PM
root / root
0644
initialise.pyo
2.299 KB
21 Apr 2022 6.08 PM
root / root
0644
win32.py
5.239 KB
21 Apr 2022 6.08 PM
root / root
0644
win32.pyc
4.744 KB
21 Apr 2022 6.08 PM
root / root
0644
win32.pyo
4.744 KB
21 Apr 2022 6.08 PM
root / root
0644
winterm.py
6.143 KB
21 Apr 2022 6.08 PM
root / root
0644
winterm.pyc
5.914 KB
21 Apr 2022 6.08 PM
root / root
0644
winterm.pyo
5.914 KB
21 Apr 2022 6.08 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF