$90 GRAYBYTE WORDPRESS FILE MANAGER $90

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

/lib/python2.7/site-packages/pip/_vendor/webencodings/

HOME
Current File : /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'))


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
10.328 KB
21 Apr 2022 6.08 PM
root / root
0644
__init__.pyc
11.2 KB
21 Apr 2022 6.08 PM
root / root
0644
__init__.pyo
11.132 KB
21 Apr 2022 6.08 PM
root / root
0644
labels.py
8.769 KB
21 Apr 2022 6.08 PM
root / root
0644
labels.pyc
5.189 KB
21 Apr 2022 6.08 PM
root / root
0644
labels.pyo
5.189 KB
21 Apr 2022 6.08 PM
root / root
0644
mklabels.py
1.274 KB
21 Apr 2022 6.08 PM
root / root
0644
mklabels.pyc
2.198 KB
21 Apr 2022 6.08 PM
root / root
0644
mklabels.pyo
2.145 KB
21 Apr 2022 6.08 PM
root / root
0644
tests.py
6.408 KB
21 Apr 2022 6.08 PM
root / root
0644
tests.pyc
6.668 KB
21 Apr 2022 6.08 PM
root / root
0644
tests.pyo
3.151 KB
21 Apr 2022 6.08 PM
root / root
0644
x_user_defined.py
4.205 KB
21 Apr 2022 6.08 PM
root / root
0644
x_user_defined.pyc
3.293 KB
21 Apr 2022 6.08 PM
root / root
0644
x_user_defined.pyo
3.293 KB
21 Apr 2022 6.08 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF