BLUE
PHP 7.4.33
Path:
//usr/lib/python3/dist-packages/click
Run
Logout
Edit File
Size: 3.13 KB
Close
//usr/lib/python3/dist-packages/click/_unicodefun.py
Text
Base64
import codecs import os from gettext import gettext as _ def _verify_python_env() -> None: """Ensures that the environment is good for Unicode.""" try: from locale import getpreferredencoding fs_enc = codecs.lookup(getpreferredencoding()).name except Exception: fs_enc = "ascii" if fs_enc != "ascii": return extra = [ _( "Click will abort further execution because Python was" " configured to use ASCII as encoding for the environment." " Consult https://click.palletsprojects.com/unicode-support/" " for mitigation steps." ) ] if os.name == "posix": import subprocess try: rv = subprocess.Popen( ["locale", "-a"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="ascii", errors="replace", ).communicate()[0] except OSError: rv = "" good_locales = set() has_c_utf8 = False for line in rv.splitlines(): locale = line.strip() if locale.lower().endswith((".utf-8", ".utf8")): good_locales.add(locale) if locale.lower() in ("c.utf8", "c.utf-8"): has_c_utf8 = True if not good_locales: extra.append( _( "Additional information: on this system no suitable" " UTF-8 locales were discovered. This most likely" " requires resolving by reconfiguring the locale" " system." ) ) elif has_c_utf8: extra.append( _( "This system supports the C.UTF-8 locale which is" " recommended. You might be able to resolve your" " issue by exporting the following environment" " variables:" ) ) extra.append(" export LC_ALL=C.UTF-8\n export LANG=C.UTF-8") else: extra.append( _( "This system lists some UTF-8 supporting locales" " that you can pick from. The following suitable" " locales were discovered: {locales}" ).format(locales=", ".join(sorted(good_locales))) ) bad_locale = None for env_locale in os.environ.get("LC_ALL"), os.environ.get("LANG"): if env_locale and env_locale.lower().endswith((".utf-8", ".utf8")): bad_locale = env_locale if env_locale is not None: break if bad_locale is not None: extra.append( _( "Click discovered that you exported a UTF-8 locale" " but the locale system could not pick up from it" " because it does not exist. The exported locale is" " {locale!r} but it is not supported." ).format(locale=bad_locale) ) raise RuntimeError("\n\n".join(extra))
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 18
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2022-08-09 11:57:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
core.py
108.87 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
decorators.py
14.52 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
exceptions.py
8.95 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
formatting.py
9.48 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
globals.py
1.94 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
parser.py
18.60 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
py.typed
0 B
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
shell_completion.py
17.58 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
termui.py
28.33 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
testing.py
15.64 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
types.py
34.56 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.py
18.32 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_compat.py
18.37 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_termui_impl.py
22.90 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_textwrap.py
1.32 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_unicodefun.py
3.13 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_winconsole.py
7.68 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
3.17 KB
lrw-r--r--
2021-10-10 18:06:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).