ACIL FM
Dark
Refresh
Current DIR:
/usr/lib/python3.9/site-packages/ansible/utils
/
usr
lib
python3.9
site-packages
ansible
utils
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
collection_loader
-
chmod
Open
Rename
Delete
__pycache__
-
chmod
Open
Rename
Delete
cmd_functions.py
2.16 MB
chmod
View
DL
Edit
Rename
Delete
color.py
4.01 MB
chmod
View
DL
Edit
Rename
Delete
context_objects.py
3.05 MB
chmod
View
DL
Edit
Rename
Delete
display.py
18.99 MB
chmod
View
DL
Edit
Rename
Delete
encrypt.py
10.26 MB
chmod
View
DL
Edit
Rename
Delete
fqcn.py
1.24 MB
chmod
View
DL
Edit
Rename
Delete
galaxy.py
3.82 MB
chmod
View
DL
Edit
Rename
Delete
hashing.py
2.84 MB
chmod
View
DL
Edit
Rename
Delete
helpers.py
1.8 MB
chmod
View
DL
Edit
Rename
Delete
jsonrpc.py
3.74 MB
chmod
View
DL
Edit
Rename
Delete
listify.py
1.67 MB
chmod
View
DL
Edit
Rename
Delete
lock.py
1.36 MB
chmod
View
DL
Edit
Rename
Delete
multiprocessing.py
698 B
chmod
View
DL
Edit
Rename
Delete
native_jinja.py
346 B
chmod
View
DL
Edit
Rename
Delete
path.py
5.74 MB
chmod
View
DL
Edit
Rename
Delete
plugin_docs.py
14.74 MB
chmod
View
DL
Edit
Rename
Delete
py3compat.py
2.35 MB
chmod
View
DL
Edit
Rename
Delete
sentinel.py
2.4 MB
chmod
View
DL
Edit
Rename
Delete
shlex.py
1.25 MB
chmod
View
DL
Edit
Rename
Delete
singleton.py
949 B
chmod
View
DL
Edit
Rename
Delete
ssh_functions.py
2.23 MB
chmod
View
DL
Edit
Rename
Delete
unicode.py
1.14 MB
chmod
View
DL
Edit
Rename
Delete
unsafe_proxy.py
12.43 MB
chmod
View
DL
Edit
Rename
Delete
vars.py
9.9 MB
chmod
View
DL
Edit
Rename
Delete
version.py
7.65 MB
chmod
View
DL
Edit
Rename
Delete
_junit_xml.py
8.53 MB
chmod
View
DL
Edit
Rename
Delete
__init__.py
833 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/lib/python3.9/site-packages/ansible/utils/color.py
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. from __future__ import (absolute_import, division, print_function) __metaclass__ = type import re import sys from ansible import constants as C ANSIBLE_COLOR = True if C.ANSIBLE_NOCOLOR: ANSIBLE_COLOR = False elif not hasattr(sys.stdout, 'isatty') or not sys.stdout.isatty(): ANSIBLE_COLOR = False else: try: import curses curses.setupterm() if curses.tigetnum('colors') < 0: ANSIBLE_COLOR = False except ImportError: # curses library was not found pass except curses.error: # curses returns an error (e.g. could not find terminal) ANSIBLE_COLOR = False if C.ANSIBLE_FORCE_COLOR: ANSIBLE_COLOR = True # --- begin "pretty" # # pretty - A miniature library that provides a Python print and stdout # wrapper that makes colored terminal text easier to use (e.g. without # having to mess around with ANSI escape sequences). This code is public # domain - there is no license except that you must leave this header. # # Copyright (C) 2008 Brian Nez <thedude at bri1 dot com> def parsecolor(color): """SGR parameter string for the specified color name.""" matches = re.match(r"color(?P<color>[0-9]+)" r"|(?P<rgb>rgb(?P<red>[0-5])(?P<green>[0-5])(?P<blue>[0-5]))" r"|gray(?P<gray>[0-9]+)", color) if not matches: return C.COLOR_CODES[color] if matches.group('color'): return u'38;5;%d' % int(matches.group('color')) if matches.group('rgb'): return u'38;5;%d' % (16 + 36 * int(matches.group('red')) + 6 * int(matches.group('green')) + int(matches.group('blue'))) if matches.group('gray'): return u'38;5;%d' % (232 + int(matches.group('gray'))) def stringc(text, color, wrap_nonvisible_chars=False): """String in color.""" if ANSIBLE_COLOR: color_code = parsecolor(color) fmt = u"\033[%sm%s\033[0m" if wrap_nonvisible_chars: # This option is provided for use in cases when the # formatting of a command line prompt is needed, such as # `ansible-console`. As said in `readline` sources: # readline/display.c:321 # /* Current implementation: # \001 (^A) start non-visible characters # \002 (^B) end non-visible characters # all characters except \001 and \002 (following a \001) are copied to # the returned string; all characters except those between \001 and # \002 are assumed to be `visible'. */ fmt = u"\001\033[%sm\002%s\001\033[0m\002" return u"\n".join([fmt % (color_code, t) for t in text.split(u'\n')]) else: return text def colorize(lead, num, color): """ Print 'lead' = 'num' in 'color' """ s = u"%s=%-4s" % (lead, str(num)) if num != 0 and ANSIBLE_COLOR and color is not None: s = stringc(s, color) return s def hostcolor(host, stats, color=True): if ANSIBLE_COLOR and color: if stats['failures'] != 0 or stats['unreachable'] != 0: return u"%-37s" % stringc(host, C.COLOR_ERROR) elif stats['changed'] != 0: return u"%-37s" % stringc(host, C.COLOR_CHANGED) else: return u"%-37s" % stringc(host, C.COLOR_OK) return u"%-26s" % host
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply