Hackfut Security File Manager
Current Path:
/usr/lib/python2.6/site-packages/pip/_vendor/colorama
usr
/
lib
/
python2.6
/
site-packages
/
pip
/
_vendor
/
colorama
/
📁
..
📄
__init__.py
(225 B)
📄
__init__.pyc
(454 B)
📄
__init__.pyo
(454 B)
📄
ansi.py
(2.25 KB)
📄
ansi.pyc
(4.36 KB)
📄
ansi.pyo
(4.36 KB)
📄
ansitowin32.py
(9.04 KB)
📄
ansitowin32.pyc
(8.98 KB)
📄
ansitowin32.pyo
(8.98 KB)
📄
initialise.py
(1.56 KB)
📄
initialise.pyc
(2.01 KB)
📄
initialise.pyo
(2.01 KB)
📄
win32.py
(5 KB)
📄
win32.pyc
(4.34 KB)
📄
win32.pyo
(4.34 KB)
📄
winterm.py
(5.6 KB)
📄
winterm.pyc
(5.87 KB)
📄
winterm.pyo
(5.87 KB)
Editing: ansi.py
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. ''' This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code ''' CSI = '\033[' OSC = '\033]' BEL = '\007' def code_to_chars(code): return CSI + str(code) + 'm' class AnsiCodes(object): def __init__(self, codes): for name in dir(codes): if not name.startswith('_'): value = getattr(codes, name) setattr(self, name, code_to_chars(value)) class AnsiCursor(object): def UP(self, n=1): return CSI + str(n) + "A" def DOWN(self, n=1): return CSI + str(n) + "B" def FORWARD(self, n=1): return CSI + str(n) + "C" def BACK(self, n=1): return CSI + str(n) + "D" def POS(self, x=1, y=1): return CSI + str(y) + ";" + str(x) + "H" def set_title(title): return OSC + "2;" + title + BEL def clear_screen(mode=2): return CSI + str(mode) + "J" def clear_line(mode=2): return CSI + str(mode) + "K" class AnsiFore: BLACK = 30 RED = 31 GREEN = 32 YELLOW = 33 BLUE = 34 MAGENTA = 35 CYAN = 36 WHITE = 37 RESET = 39 # These are fairly well supported, but not part of the standard. LIGHTBLACK_EX = 90 LIGHTRED_EX = 91 LIGHTGREEN_EX = 92 LIGHTYELLOW_EX = 93 LIGHTBLUE_EX = 94 LIGHTMAGENTA_EX = 95 LIGHTCYAN_EX = 96 LIGHTWHITE_EX = 97 class AnsiBack: BLACK = 40 RED = 41 GREEN = 42 YELLOW = 43 BLUE = 44 MAGENTA = 45 CYAN = 46 WHITE = 47 RESET = 49 # These are fairly well supported, but not part of the standard. LIGHTBLACK_EX = 100 LIGHTRED_EX = 101 LIGHTGREEN_EX = 102 LIGHTYELLOW_EX = 103 LIGHTBLUE_EX = 104 LIGHTMAGENTA_EX = 105 LIGHTCYAN_EX = 106 LIGHTWHITE_EX = 107 class AnsiStyle: BRIGHT = 1 DIM = 2 NORMAL = 22 RESET_ALL = 0 Fore = AnsiCodes( AnsiFore ) Back = AnsiCodes( AnsiBack ) Style = AnsiCodes( AnsiStyle ) Cursor = AnsiCursor()
Upload File
Create Folder