SILENT KILLERPanel

Current Path: > > usr > lib > python2.7 > site-packages > pip > > > _vendor > webencodings


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //usr/lib/python2.7/site-packages/pip///_vendor/webencodings

NameTypeSizeLast ModifiedActions
__init__.py File 10576 bytes April 21 2022 18:08:21.
__init__.pyc File 11469 bytes April 21 2022 18:08:35.
__init__.pyo File 11399 bytes April 21 2022 18:08:36.
labels.py File 8979 bytes April 21 2022 18:08:21.
labels.pyc File 5314 bytes April 21 2022 18:08:35.
labels.pyo File 5314 bytes April 21 2022 18:08:35.
mklabels.py File 1305 bytes April 21 2022 18:08:21.
mklabels.pyc File 2251 bytes April 21 2022 18:08:35.
mklabels.pyo File 2196 bytes April 21 2022 18:08:36.
tests.py File 6562 bytes April 21 2022 18:08:21.
tests.pyc File 6828 bytes April 21 2022 18:08:35.
tests.pyo File 3227 bytes April 21 2022 18:08:36.
x_user_defined.py File 4306 bytes April 21 2022 18:08:21.
x_user_defined.pyc File 3372 bytes April 21 2022 18:08:35.
x_user_defined.pyo File 3372 bytes April 21 2022 18:08:35.

Reading File: //usr/lib/python2.7/site-packages/pip///_vendor/webencodings/mklabels.py

"""

    webencodings.mklabels
    ~~~~~~~~~~~~~~~~~~~~~

    Regenarate the webencodings.labels module.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

import json
try:
    from urllib import urlopen
except ImportError:
    from urllib.request import urlopen


def assert_lower(string):
    assert string == string.lower()
    return string


def generate(url):
    parts = ['''\
"""

    webencodings.labels
    ~~~~~~~~~~~~~~~~~~~

    Map encoding labels to their name.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

# XXX Do not edit!
# This file is automatically generated by mklabels.py

LABELS = {
''']
    labels = [
        (repr(assert_lower(label)).lstrip('u'),
         repr(encoding['name']).lstrip('u'))
        for category in json.loads(urlopen(url).read().decode('ascii'))
        for encoding in category['encodings']
        for label in encoding['labels']]
    max_len = max(len(label) for label, name in labels)
    parts.extend(
        '    %s:%s %s,\n' % (label, ' ' * (max_len - len(label)), name)
        for label, name in labels)
    parts.append('}')
    return ''.join(parts)


if __name__ == '__main__':
    print(generate('http://encoding.spec.whatwg.org/encodings.json'))

SILENT KILLER Tool