Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- pllava/lib/python3.10/concurrent/__init__.py +1 -0
- pllava/lib/python3.10/concurrent/__pycache__/__init__.cpython-310.pyc +0 -0
- pllava/lib/python3.10/concurrent/futures/__init__.py +53 -0
- pllava/lib/python3.10/concurrent/futures/__pycache__/__init__.cpython-310.pyc +0 -0
- pllava/lib/python3.10/concurrent/futures/__pycache__/_base.cpython-310.pyc +0 -0
- pllava/lib/python3.10/concurrent/futures/__pycache__/process.cpython-310.pyc +0 -0
- pllava/lib/python3.10/concurrent/futures/__pycache__/thread.cpython-310.pyc +0 -0
- pllava/lib/python3.10/concurrent/futures/_base.py +656 -0
- pllava/lib/python3.10/concurrent/futures/process.py +791 -0
- pllava/lib/python3.10/concurrent/futures/thread.py +236 -0
- pllava/lib/python3.10/encodings/ascii.py +50 -0
- pllava/lib/python3.10/encodings/cp037.py +307 -0
- pllava/lib/python3.10/encodings/cp1006.py +307 -0
- pllava/lib/python3.10/encodings/cp1258.py +307 -0
- pllava/lib/python3.10/encodings/cp856.py +307 -0
- pllava/lib/python3.10/encodings/cp864.py +690 -0
- pllava/lib/python3.10/encodings/hp_roman8.py +314 -0
- pllava/lib/python3.10/encodings/iso2022_jp_1.py +39 -0
- pllava/lib/python3.10/encodings/iso2022_jp_ext.py +39 -0
- pllava/lib/python3.10/encodings/iso8859_10.py +307 -0
- pllava/lib/python3.10/encodings/iso8859_13.py +307 -0
- pllava/lib/python3.10/encodings/iso8859_3.py +307 -0
- pllava/lib/python3.10/encodings/iso8859_8.py +307 -0
- pllava/lib/python3.10/encodings/latin_1.py +50 -0
- pllava/lib/python3.10/encodings/mac_croatian.py +307 -0
- pllava/lib/python3.10/encodings/mac_iceland.py +307 -0
- pllava/lib/python3.10/encodings/palmos.py +308 -0
- pllava/lib/python3.10/encodings/rot_13.py +113 -0
- pllava/lib/python3.10/encodings/utf_32.py +150 -0
- pllava/lib/python3.10/idlelib/Icons/idle_32.gif +3 -0
- pllava/lib/python3.10/idlelib/Icons/idle_32.png +3 -0
- pllava/lib/python3.10/idlelib/__pycache__/autoexpand.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/calltip.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/calltip_w.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/codecontext.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/config_key.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/configdialog.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/debugger_r.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/debugobj.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/filelist.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/format.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/hyperparser.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/iomenu.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/macosx.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/pathbrowser.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/redirector.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/rpc.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/scrolledlist.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/search.cpython-310.pyc +0 -0
- pllava/lib/python3.10/idlelib/__pycache__/searchengine.cpython-310.pyc +0 -0
pllava/lib/python3.10/concurrent/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# This directory is a Python package.
|
pllava/lib/python3.10/concurrent/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (389 Bytes). View file
|
|
|
pllava/lib/python3.10/concurrent/futures/__init__.py
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2009 Brian Quinlan. All Rights Reserved.
|
| 2 |
+
# Licensed to PSF under a Contributor Agreement.
|
| 3 |
+
|
| 4 |
+
"""Execute computations asynchronously using threads or processes."""
|
| 5 |
+
|
| 6 |
+
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
|
| 7 |
+
|
| 8 |
+
from concurrent.futures._base import (FIRST_COMPLETED,
|
| 9 |
+
FIRST_EXCEPTION,
|
| 10 |
+
ALL_COMPLETED,
|
| 11 |
+
CancelledError,
|
| 12 |
+
TimeoutError,
|
| 13 |
+
InvalidStateError,
|
| 14 |
+
BrokenExecutor,
|
| 15 |
+
Future,
|
| 16 |
+
Executor,
|
| 17 |
+
wait,
|
| 18 |
+
as_completed)
|
| 19 |
+
|
| 20 |
+
__all__ = (
|
| 21 |
+
'FIRST_COMPLETED',
|
| 22 |
+
'FIRST_EXCEPTION',
|
| 23 |
+
'ALL_COMPLETED',
|
| 24 |
+
'CancelledError',
|
| 25 |
+
'TimeoutError',
|
| 26 |
+
'BrokenExecutor',
|
| 27 |
+
'Future',
|
| 28 |
+
'Executor',
|
| 29 |
+
'wait',
|
| 30 |
+
'as_completed',
|
| 31 |
+
'ProcessPoolExecutor',
|
| 32 |
+
'ThreadPoolExecutor',
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
def __dir__():
|
| 37 |
+
return __all__ + ('__author__', '__doc__')
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def __getattr__(name):
|
| 41 |
+
global ProcessPoolExecutor, ThreadPoolExecutor
|
| 42 |
+
|
| 43 |
+
if name == 'ProcessPoolExecutor':
|
| 44 |
+
from .process import ProcessPoolExecutor as pe
|
| 45 |
+
ProcessPoolExecutor = pe
|
| 46 |
+
return pe
|
| 47 |
+
|
| 48 |
+
if name == 'ThreadPoolExecutor':
|
| 49 |
+
from .thread import ThreadPoolExecutor as te
|
| 50 |
+
ThreadPoolExecutor = te
|
| 51 |
+
return te
|
| 52 |
+
|
| 53 |
+
raise AttributeError(f"module {__name__} has no attribute {name}")
|
pllava/lib/python3.10/concurrent/futures/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (1.36 kB). View file
|
|
|
pllava/lib/python3.10/concurrent/futures/__pycache__/_base.cpython-310.pyc
ADDED
|
Binary file (22.5 kB). View file
|
|
|
pllava/lib/python3.10/concurrent/futures/__pycache__/process.cpython-310.pyc
ADDED
|
Binary file (22 kB). View file
|
|
|
pllava/lib/python3.10/concurrent/futures/__pycache__/thread.cpython-310.pyc
ADDED
|
Binary file (6.22 kB). View file
|
|
|
pllava/lib/python3.10/concurrent/futures/_base.py
ADDED
|
@@ -0,0 +1,656 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2009 Brian Quinlan. All Rights Reserved.
|
| 2 |
+
# Licensed to PSF under a Contributor Agreement.
|
| 3 |
+
|
| 4 |
+
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
|
| 5 |
+
|
| 6 |
+
import collections
|
| 7 |
+
import logging
|
| 8 |
+
import threading
|
| 9 |
+
import time
|
| 10 |
+
import types
|
| 11 |
+
|
| 12 |
+
FIRST_COMPLETED = 'FIRST_COMPLETED'
|
| 13 |
+
FIRST_EXCEPTION = 'FIRST_EXCEPTION'
|
| 14 |
+
ALL_COMPLETED = 'ALL_COMPLETED'
|
| 15 |
+
_AS_COMPLETED = '_AS_COMPLETED'
|
| 16 |
+
|
| 17 |
+
# Possible future states (for internal use by the futures package).
|
| 18 |
+
PENDING = 'PENDING'
|
| 19 |
+
RUNNING = 'RUNNING'
|
| 20 |
+
# The future was cancelled by the user...
|
| 21 |
+
CANCELLED = 'CANCELLED'
|
| 22 |
+
# ...and _Waiter.add_cancelled() was called by a worker.
|
| 23 |
+
CANCELLED_AND_NOTIFIED = 'CANCELLED_AND_NOTIFIED'
|
| 24 |
+
FINISHED = 'FINISHED'
|
| 25 |
+
|
| 26 |
+
_FUTURE_STATES = [
|
| 27 |
+
PENDING,
|
| 28 |
+
RUNNING,
|
| 29 |
+
CANCELLED,
|
| 30 |
+
CANCELLED_AND_NOTIFIED,
|
| 31 |
+
FINISHED
|
| 32 |
+
]
|
| 33 |
+
|
| 34 |
+
_STATE_TO_DESCRIPTION_MAP = {
|
| 35 |
+
PENDING: "pending",
|
| 36 |
+
RUNNING: "running",
|
| 37 |
+
CANCELLED: "cancelled",
|
| 38 |
+
CANCELLED_AND_NOTIFIED: "cancelled",
|
| 39 |
+
FINISHED: "finished"
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
# Logger for internal use by the futures package.
|
| 43 |
+
LOGGER = logging.getLogger("concurrent.futures")
|
| 44 |
+
|
| 45 |
+
class Error(Exception):
|
| 46 |
+
"""Base class for all future-related exceptions."""
|
| 47 |
+
pass
|
| 48 |
+
|
| 49 |
+
class CancelledError(Error):
|
| 50 |
+
"""The Future was cancelled."""
|
| 51 |
+
pass
|
| 52 |
+
|
| 53 |
+
class TimeoutError(Error):
|
| 54 |
+
"""The operation exceeded the given deadline."""
|
| 55 |
+
pass
|
| 56 |
+
|
| 57 |
+
class InvalidStateError(Error):
|
| 58 |
+
"""The operation is not allowed in this state."""
|
| 59 |
+
pass
|
| 60 |
+
|
| 61 |
+
class _Waiter(object):
|
| 62 |
+
"""Provides the event that wait() and as_completed() block on."""
|
| 63 |
+
def __init__(self):
|
| 64 |
+
self.event = threading.Event()
|
| 65 |
+
self.finished_futures = []
|
| 66 |
+
|
| 67 |
+
def add_result(self, future):
|
| 68 |
+
self.finished_futures.append(future)
|
| 69 |
+
|
| 70 |
+
def add_exception(self, future):
|
| 71 |
+
self.finished_futures.append(future)
|
| 72 |
+
|
| 73 |
+
def add_cancelled(self, future):
|
| 74 |
+
self.finished_futures.append(future)
|
| 75 |
+
|
| 76 |
+
class _AsCompletedWaiter(_Waiter):
|
| 77 |
+
"""Used by as_completed()."""
|
| 78 |
+
|
| 79 |
+
def __init__(self):
|
| 80 |
+
super(_AsCompletedWaiter, self).__init__()
|
| 81 |
+
self.lock = threading.Lock()
|
| 82 |
+
|
| 83 |
+
def add_result(self, future):
|
| 84 |
+
with self.lock:
|
| 85 |
+
super(_AsCompletedWaiter, self).add_result(future)
|
| 86 |
+
self.event.set()
|
| 87 |
+
|
| 88 |
+
def add_exception(self, future):
|
| 89 |
+
with self.lock:
|
| 90 |
+
super(_AsCompletedWaiter, self).add_exception(future)
|
| 91 |
+
self.event.set()
|
| 92 |
+
|
| 93 |
+
def add_cancelled(self, future):
|
| 94 |
+
with self.lock:
|
| 95 |
+
super(_AsCompletedWaiter, self).add_cancelled(future)
|
| 96 |
+
self.event.set()
|
| 97 |
+
|
| 98 |
+
class _FirstCompletedWaiter(_Waiter):
|
| 99 |
+
"""Used by wait(return_when=FIRST_COMPLETED)."""
|
| 100 |
+
|
| 101 |
+
def add_result(self, future):
|
| 102 |
+
super().add_result(future)
|
| 103 |
+
self.event.set()
|
| 104 |
+
|
| 105 |
+
def add_exception(self, future):
|
| 106 |
+
super().add_exception(future)
|
| 107 |
+
self.event.set()
|
| 108 |
+
|
| 109 |
+
def add_cancelled(self, future):
|
| 110 |
+
super().add_cancelled(future)
|
| 111 |
+
self.event.set()
|
| 112 |
+
|
| 113 |
+
class _AllCompletedWaiter(_Waiter):
|
| 114 |
+
"""Used by wait(return_when=FIRST_EXCEPTION and ALL_COMPLETED)."""
|
| 115 |
+
|
| 116 |
+
def __init__(self, num_pending_calls, stop_on_exception):
|
| 117 |
+
self.num_pending_calls = num_pending_calls
|
| 118 |
+
self.stop_on_exception = stop_on_exception
|
| 119 |
+
self.lock = threading.Lock()
|
| 120 |
+
super().__init__()
|
| 121 |
+
|
| 122 |
+
def _decrement_pending_calls(self):
|
| 123 |
+
with self.lock:
|
| 124 |
+
self.num_pending_calls -= 1
|
| 125 |
+
if not self.num_pending_calls:
|
| 126 |
+
self.event.set()
|
| 127 |
+
|
| 128 |
+
def add_result(self, future):
|
| 129 |
+
super().add_result(future)
|
| 130 |
+
self._decrement_pending_calls()
|
| 131 |
+
|
| 132 |
+
def add_exception(self, future):
|
| 133 |
+
super().add_exception(future)
|
| 134 |
+
if self.stop_on_exception:
|
| 135 |
+
self.event.set()
|
| 136 |
+
else:
|
| 137 |
+
self._decrement_pending_calls()
|
| 138 |
+
|
| 139 |
+
def add_cancelled(self, future):
|
| 140 |
+
super().add_cancelled(future)
|
| 141 |
+
self._decrement_pending_calls()
|
| 142 |
+
|
| 143 |
+
class _AcquireFutures(object):
|
| 144 |
+
"""A context manager that does an ordered acquire of Future conditions."""
|
| 145 |
+
|
| 146 |
+
def __init__(self, futures):
|
| 147 |
+
self.futures = sorted(futures, key=id)
|
| 148 |
+
|
| 149 |
+
def __enter__(self):
|
| 150 |
+
for future in self.futures:
|
| 151 |
+
future._condition.acquire()
|
| 152 |
+
|
| 153 |
+
def __exit__(self, *args):
|
| 154 |
+
for future in self.futures:
|
| 155 |
+
future._condition.release()
|
| 156 |
+
|
| 157 |
+
def _create_and_install_waiters(fs, return_when):
|
| 158 |
+
if return_when == _AS_COMPLETED:
|
| 159 |
+
waiter = _AsCompletedWaiter()
|
| 160 |
+
elif return_when == FIRST_COMPLETED:
|
| 161 |
+
waiter = _FirstCompletedWaiter()
|
| 162 |
+
else:
|
| 163 |
+
pending_count = sum(
|
| 164 |
+
f._state not in [CANCELLED_AND_NOTIFIED, FINISHED] for f in fs)
|
| 165 |
+
|
| 166 |
+
if return_when == FIRST_EXCEPTION:
|
| 167 |
+
waiter = _AllCompletedWaiter(pending_count, stop_on_exception=True)
|
| 168 |
+
elif return_when == ALL_COMPLETED:
|
| 169 |
+
waiter = _AllCompletedWaiter(pending_count, stop_on_exception=False)
|
| 170 |
+
else:
|
| 171 |
+
raise ValueError("Invalid return condition: %r" % return_when)
|
| 172 |
+
|
| 173 |
+
for f in fs:
|
| 174 |
+
f._waiters.append(waiter)
|
| 175 |
+
|
| 176 |
+
return waiter
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
def _yield_finished_futures(fs, waiter, ref_collect):
|
| 180 |
+
"""
|
| 181 |
+
Iterate on the list *fs*, yielding finished futures one by one in
|
| 182 |
+
reverse order.
|
| 183 |
+
Before yielding a future, *waiter* is removed from its waiters
|
| 184 |
+
and the future is removed from each set in the collection of sets
|
| 185 |
+
*ref_collect*.
|
| 186 |
+
|
| 187 |
+
The aim of this function is to avoid keeping stale references after
|
| 188 |
+
the future is yielded and before the iterator resumes.
|
| 189 |
+
"""
|
| 190 |
+
while fs:
|
| 191 |
+
f = fs[-1]
|
| 192 |
+
for futures_set in ref_collect:
|
| 193 |
+
futures_set.remove(f)
|
| 194 |
+
with f._condition:
|
| 195 |
+
f._waiters.remove(waiter)
|
| 196 |
+
del f
|
| 197 |
+
# Careful not to keep a reference to the popped value
|
| 198 |
+
yield fs.pop()
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
def as_completed(fs, timeout=None):
|
| 202 |
+
"""An iterator over the given futures that yields each as it completes.
|
| 203 |
+
|
| 204 |
+
Args:
|
| 205 |
+
fs: The sequence of Futures (possibly created by different Executors) to
|
| 206 |
+
iterate over.
|
| 207 |
+
timeout: The maximum number of seconds to wait. If None, then there
|
| 208 |
+
is no limit on the wait time.
|
| 209 |
+
|
| 210 |
+
Returns:
|
| 211 |
+
An iterator that yields the given Futures as they complete (finished or
|
| 212 |
+
cancelled). If any given Futures are duplicated, they will be returned
|
| 213 |
+
once.
|
| 214 |
+
|
| 215 |
+
Raises:
|
| 216 |
+
TimeoutError: If the entire result iterator could not be generated
|
| 217 |
+
before the given timeout.
|
| 218 |
+
"""
|
| 219 |
+
if timeout is not None:
|
| 220 |
+
end_time = timeout + time.monotonic()
|
| 221 |
+
|
| 222 |
+
fs = set(fs)
|
| 223 |
+
total_futures = len(fs)
|
| 224 |
+
with _AcquireFutures(fs):
|
| 225 |
+
finished = set(
|
| 226 |
+
f for f in fs
|
| 227 |
+
if f._state in [CANCELLED_AND_NOTIFIED, FINISHED])
|
| 228 |
+
pending = fs - finished
|
| 229 |
+
waiter = _create_and_install_waiters(fs, _AS_COMPLETED)
|
| 230 |
+
finished = list(finished)
|
| 231 |
+
try:
|
| 232 |
+
yield from _yield_finished_futures(finished, waiter,
|
| 233 |
+
ref_collect=(fs,))
|
| 234 |
+
|
| 235 |
+
while pending:
|
| 236 |
+
if timeout is None:
|
| 237 |
+
wait_timeout = None
|
| 238 |
+
else:
|
| 239 |
+
wait_timeout = end_time - time.monotonic()
|
| 240 |
+
if wait_timeout < 0:
|
| 241 |
+
raise TimeoutError(
|
| 242 |
+
'%d (of %d) futures unfinished' % (
|
| 243 |
+
len(pending), total_futures))
|
| 244 |
+
|
| 245 |
+
waiter.event.wait(wait_timeout)
|
| 246 |
+
|
| 247 |
+
with waiter.lock:
|
| 248 |
+
finished = waiter.finished_futures
|
| 249 |
+
waiter.finished_futures = []
|
| 250 |
+
waiter.event.clear()
|
| 251 |
+
|
| 252 |
+
# reverse to keep finishing order
|
| 253 |
+
finished.reverse()
|
| 254 |
+
yield from _yield_finished_futures(finished, waiter,
|
| 255 |
+
ref_collect=(fs, pending))
|
| 256 |
+
|
| 257 |
+
finally:
|
| 258 |
+
# Remove waiter from unfinished futures
|
| 259 |
+
for f in fs:
|
| 260 |
+
with f._condition:
|
| 261 |
+
f._waiters.remove(waiter)
|
| 262 |
+
|
| 263 |
+
DoneAndNotDoneFutures = collections.namedtuple(
|
| 264 |
+
'DoneAndNotDoneFutures', 'done not_done')
|
| 265 |
+
def wait(fs, timeout=None, return_when=ALL_COMPLETED):
|
| 266 |
+
"""Wait for the futures in the given sequence to complete.
|
| 267 |
+
|
| 268 |
+
Args:
|
| 269 |
+
fs: The sequence of Futures (possibly created by different Executors) to
|
| 270 |
+
wait upon.
|
| 271 |
+
timeout: The maximum number of seconds to wait. If None, then there
|
| 272 |
+
is no limit on the wait time.
|
| 273 |
+
return_when: Indicates when this function should return. The options
|
| 274 |
+
are:
|
| 275 |
+
|
| 276 |
+
FIRST_COMPLETED - Return when any future finishes or is
|
| 277 |
+
cancelled.
|
| 278 |
+
FIRST_EXCEPTION - Return when any future finishes by raising an
|
| 279 |
+
exception. If no future raises an exception
|
| 280 |
+
then it is equivalent to ALL_COMPLETED.
|
| 281 |
+
ALL_COMPLETED - Return when all futures finish or are cancelled.
|
| 282 |
+
|
| 283 |
+
Returns:
|
| 284 |
+
A named 2-tuple of sets. The first set, named 'done', contains the
|
| 285 |
+
futures that completed (is finished or cancelled) before the wait
|
| 286 |
+
completed. The second set, named 'not_done', contains uncompleted
|
| 287 |
+
futures. Duplicate futures given to *fs* are removed and will be
|
| 288 |
+
returned only once.
|
| 289 |
+
"""
|
| 290 |
+
fs = set(fs)
|
| 291 |
+
with _AcquireFutures(fs):
|
| 292 |
+
done = {f for f in fs
|
| 293 |
+
if f._state in [CANCELLED_AND_NOTIFIED, FINISHED]}
|
| 294 |
+
not_done = fs - done
|
| 295 |
+
if (return_when == FIRST_COMPLETED) and done:
|
| 296 |
+
return DoneAndNotDoneFutures(done, not_done)
|
| 297 |
+
elif (return_when == FIRST_EXCEPTION) and done:
|
| 298 |
+
if any(f for f in done
|
| 299 |
+
if not f.cancelled() and f.exception() is not None):
|
| 300 |
+
return DoneAndNotDoneFutures(done, not_done)
|
| 301 |
+
|
| 302 |
+
if len(done) == len(fs):
|
| 303 |
+
return DoneAndNotDoneFutures(done, not_done)
|
| 304 |
+
|
| 305 |
+
waiter = _create_and_install_waiters(fs, return_when)
|
| 306 |
+
|
| 307 |
+
waiter.event.wait(timeout)
|
| 308 |
+
for f in fs:
|
| 309 |
+
with f._condition:
|
| 310 |
+
f._waiters.remove(waiter)
|
| 311 |
+
|
| 312 |
+
done.update(waiter.finished_futures)
|
| 313 |
+
return DoneAndNotDoneFutures(done, fs - done)
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
def _result_or_cancel(fut, timeout=None):
|
| 317 |
+
try:
|
| 318 |
+
try:
|
| 319 |
+
return fut.result(timeout)
|
| 320 |
+
finally:
|
| 321 |
+
fut.cancel()
|
| 322 |
+
finally:
|
| 323 |
+
# Break a reference cycle with the exception in self._exception
|
| 324 |
+
del fut
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
class Future(object):
|
| 328 |
+
"""Represents the result of an asynchronous computation."""
|
| 329 |
+
|
| 330 |
+
def __init__(self):
|
| 331 |
+
"""Initializes the future. Should not be called by clients."""
|
| 332 |
+
self._condition = threading.Condition()
|
| 333 |
+
self._state = PENDING
|
| 334 |
+
self._result = None
|
| 335 |
+
self._exception = None
|
| 336 |
+
self._waiters = []
|
| 337 |
+
self._done_callbacks = []
|
| 338 |
+
|
| 339 |
+
def _invoke_callbacks(self):
|
| 340 |
+
for callback in self._done_callbacks:
|
| 341 |
+
try:
|
| 342 |
+
callback(self)
|
| 343 |
+
except Exception:
|
| 344 |
+
LOGGER.exception('exception calling callback for %r', self)
|
| 345 |
+
|
| 346 |
+
def __repr__(self):
|
| 347 |
+
with self._condition:
|
| 348 |
+
if self._state == FINISHED:
|
| 349 |
+
if self._exception:
|
| 350 |
+
return '<%s at %#x state=%s raised %s>' % (
|
| 351 |
+
self.__class__.__name__,
|
| 352 |
+
id(self),
|
| 353 |
+
_STATE_TO_DESCRIPTION_MAP[self._state],
|
| 354 |
+
self._exception.__class__.__name__)
|
| 355 |
+
else:
|
| 356 |
+
return '<%s at %#x state=%s returned %s>' % (
|
| 357 |
+
self.__class__.__name__,
|
| 358 |
+
id(self),
|
| 359 |
+
_STATE_TO_DESCRIPTION_MAP[self._state],
|
| 360 |
+
self._result.__class__.__name__)
|
| 361 |
+
return '<%s at %#x state=%s>' % (
|
| 362 |
+
self.__class__.__name__,
|
| 363 |
+
id(self),
|
| 364 |
+
_STATE_TO_DESCRIPTION_MAP[self._state])
|
| 365 |
+
|
| 366 |
+
def cancel(self):
|
| 367 |
+
"""Cancel the future if possible.
|
| 368 |
+
|
| 369 |
+
Returns True if the future was cancelled, False otherwise. A future
|
| 370 |
+
cannot be cancelled if it is running or has already completed.
|
| 371 |
+
"""
|
| 372 |
+
with self._condition:
|
| 373 |
+
if self._state in [RUNNING, FINISHED]:
|
| 374 |
+
return False
|
| 375 |
+
|
| 376 |
+
if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
|
| 377 |
+
return True
|
| 378 |
+
|
| 379 |
+
self._state = CANCELLED
|
| 380 |
+
self._condition.notify_all()
|
| 381 |
+
|
| 382 |
+
self._invoke_callbacks()
|
| 383 |
+
return True
|
| 384 |
+
|
| 385 |
+
def cancelled(self):
|
| 386 |
+
"""Return True if the future was cancelled."""
|
| 387 |
+
with self._condition:
|
| 388 |
+
return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]
|
| 389 |
+
|
| 390 |
+
def running(self):
|
| 391 |
+
"""Return True if the future is currently executing."""
|
| 392 |
+
with self._condition:
|
| 393 |
+
return self._state == RUNNING
|
| 394 |
+
|
| 395 |
+
def done(self):
|
| 396 |
+
"""Return True if the future was cancelled or finished executing."""
|
| 397 |
+
with self._condition:
|
| 398 |
+
return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED]
|
| 399 |
+
|
| 400 |
+
def __get_result(self):
|
| 401 |
+
if self._exception:
|
| 402 |
+
try:
|
| 403 |
+
raise self._exception
|
| 404 |
+
finally:
|
| 405 |
+
# Break a reference cycle with the exception in self._exception
|
| 406 |
+
self = None
|
| 407 |
+
else:
|
| 408 |
+
return self._result
|
| 409 |
+
|
| 410 |
+
def add_done_callback(self, fn):
|
| 411 |
+
"""Attaches a callable that will be called when the future finishes.
|
| 412 |
+
|
| 413 |
+
Args:
|
| 414 |
+
fn: A callable that will be called with this future as its only
|
| 415 |
+
argument when the future completes or is cancelled. The callable
|
| 416 |
+
will always be called by a thread in the same process in which
|
| 417 |
+
it was added. If the future has already completed or been
|
| 418 |
+
cancelled then the callable will be called immediately. These
|
| 419 |
+
callables are called in the order that they were added.
|
| 420 |
+
"""
|
| 421 |
+
with self._condition:
|
| 422 |
+
if self._state not in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED]:
|
| 423 |
+
self._done_callbacks.append(fn)
|
| 424 |
+
return
|
| 425 |
+
try:
|
| 426 |
+
fn(self)
|
| 427 |
+
except Exception:
|
| 428 |
+
LOGGER.exception('exception calling callback for %r', self)
|
| 429 |
+
|
| 430 |
+
def result(self, timeout=None):
|
| 431 |
+
"""Return the result of the call that the future represents.
|
| 432 |
+
|
| 433 |
+
Args:
|
| 434 |
+
timeout: The number of seconds to wait for the result if the future
|
| 435 |
+
isn't done. If None, then there is no limit on the wait time.
|
| 436 |
+
|
| 437 |
+
Returns:
|
| 438 |
+
The result of the call that the future represents.
|
| 439 |
+
|
| 440 |
+
Raises:
|
| 441 |
+
CancelledError: If the future was cancelled.
|
| 442 |
+
TimeoutError: If the future didn't finish executing before the given
|
| 443 |
+
timeout.
|
| 444 |
+
Exception: If the call raised then that exception will be raised.
|
| 445 |
+
"""
|
| 446 |
+
try:
|
| 447 |
+
with self._condition:
|
| 448 |
+
if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
|
| 449 |
+
raise CancelledError()
|
| 450 |
+
elif self._state == FINISHED:
|
| 451 |
+
return self.__get_result()
|
| 452 |
+
|
| 453 |
+
self._condition.wait(timeout)
|
| 454 |
+
|
| 455 |
+
if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
|
| 456 |
+
raise CancelledError()
|
| 457 |
+
elif self._state == FINISHED:
|
| 458 |
+
return self.__get_result()
|
| 459 |
+
else:
|
| 460 |
+
raise TimeoutError()
|
| 461 |
+
finally:
|
| 462 |
+
# Break a reference cycle with the exception in self._exception
|
| 463 |
+
self = None
|
| 464 |
+
|
| 465 |
+
def exception(self, timeout=None):
|
| 466 |
+
"""Return the exception raised by the call that the future represents.
|
| 467 |
+
|
| 468 |
+
Args:
|
| 469 |
+
timeout: The number of seconds to wait for the exception if the
|
| 470 |
+
future isn't done. If None, then there is no limit on the wait
|
| 471 |
+
time.
|
| 472 |
+
|
| 473 |
+
Returns:
|
| 474 |
+
The exception raised by the call that the future represents or None
|
| 475 |
+
if the call completed without raising.
|
| 476 |
+
|
| 477 |
+
Raises:
|
| 478 |
+
CancelledError: If the future was cancelled.
|
| 479 |
+
TimeoutError: If the future didn't finish executing before the given
|
| 480 |
+
timeout.
|
| 481 |
+
"""
|
| 482 |
+
|
| 483 |
+
with self._condition:
|
| 484 |
+
if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
|
| 485 |
+
raise CancelledError()
|
| 486 |
+
elif self._state == FINISHED:
|
| 487 |
+
return self._exception
|
| 488 |
+
|
| 489 |
+
self._condition.wait(timeout)
|
| 490 |
+
|
| 491 |
+
if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
|
| 492 |
+
raise CancelledError()
|
| 493 |
+
elif self._state == FINISHED:
|
| 494 |
+
return self._exception
|
| 495 |
+
else:
|
| 496 |
+
raise TimeoutError()
|
| 497 |
+
|
| 498 |
+
# The following methods should only be used by Executors and in tests.
|
| 499 |
+
def set_running_or_notify_cancel(self):
|
| 500 |
+
"""Mark the future as running or process any cancel notifications.
|
| 501 |
+
|
| 502 |
+
Should only be used by Executor implementations and unit tests.
|
| 503 |
+
|
| 504 |
+
If the future has been cancelled (cancel() was called and returned
|
| 505 |
+
True) then any threads waiting on the future completing (though calls
|
| 506 |
+
to as_completed() or wait()) are notified and False is returned.
|
| 507 |
+
|
| 508 |
+
If the future was not cancelled then it is put in the running state
|
| 509 |
+
(future calls to running() will return True) and True is returned.
|
| 510 |
+
|
| 511 |
+
This method should be called by Executor implementations before
|
| 512 |
+
executing the work associated with this future. If this method returns
|
| 513 |
+
False then the work should not be executed.
|
| 514 |
+
|
| 515 |
+
Returns:
|
| 516 |
+
False if the Future was cancelled, True otherwise.
|
| 517 |
+
|
| 518 |
+
Raises:
|
| 519 |
+
RuntimeError: if this method was already called or if set_result()
|
| 520 |
+
or set_exception() was called.
|
| 521 |
+
"""
|
| 522 |
+
with self._condition:
|
| 523 |
+
if self._state == CANCELLED:
|
| 524 |
+
self._state = CANCELLED_AND_NOTIFIED
|
| 525 |
+
for waiter in self._waiters:
|
| 526 |
+
waiter.add_cancelled(self)
|
| 527 |
+
# self._condition.notify_all() is not necessary because
|
| 528 |
+
# self.cancel() triggers a notification.
|
| 529 |
+
return False
|
| 530 |
+
elif self._state == PENDING:
|
| 531 |
+
self._state = RUNNING
|
| 532 |
+
return True
|
| 533 |
+
else:
|
| 534 |
+
LOGGER.critical('Future %s in unexpected state: %s',
|
| 535 |
+
id(self),
|
| 536 |
+
self._state)
|
| 537 |
+
raise RuntimeError('Future in unexpected state')
|
| 538 |
+
|
| 539 |
+
def set_result(self, result):
|
| 540 |
+
"""Sets the return value of work associated with the future.
|
| 541 |
+
|
| 542 |
+
Should only be used by Executor implementations and unit tests.
|
| 543 |
+
"""
|
| 544 |
+
with self._condition:
|
| 545 |
+
if self._state in {CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED}:
|
| 546 |
+
raise InvalidStateError('{}: {!r}'.format(self._state, self))
|
| 547 |
+
self._result = result
|
| 548 |
+
self._state = FINISHED
|
| 549 |
+
for waiter in self._waiters:
|
| 550 |
+
waiter.add_result(self)
|
| 551 |
+
self._condition.notify_all()
|
| 552 |
+
self._invoke_callbacks()
|
| 553 |
+
|
| 554 |
+
def set_exception(self, exception):
|
| 555 |
+
"""Sets the result of the future as being the given exception.
|
| 556 |
+
|
| 557 |
+
Should only be used by Executor implementations and unit tests.
|
| 558 |
+
"""
|
| 559 |
+
with self._condition:
|
| 560 |
+
if self._state in {CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED}:
|
| 561 |
+
raise InvalidStateError('{}: {!r}'.format(self._state, self))
|
| 562 |
+
self._exception = exception
|
| 563 |
+
self._state = FINISHED
|
| 564 |
+
for waiter in self._waiters:
|
| 565 |
+
waiter.add_exception(self)
|
| 566 |
+
self._condition.notify_all()
|
| 567 |
+
self._invoke_callbacks()
|
| 568 |
+
|
| 569 |
+
__class_getitem__ = classmethod(types.GenericAlias)
|
| 570 |
+
|
| 571 |
+
class Executor(object):
|
| 572 |
+
"""This is an abstract base class for concrete asynchronous executors."""
|
| 573 |
+
|
| 574 |
+
def submit(self, fn, /, *args, **kwargs):
|
| 575 |
+
"""Submits a callable to be executed with the given arguments.
|
| 576 |
+
|
| 577 |
+
Schedules the callable to be executed as fn(*args, **kwargs) and returns
|
| 578 |
+
a Future instance representing the execution of the callable.
|
| 579 |
+
|
| 580 |
+
Returns:
|
| 581 |
+
A Future representing the given call.
|
| 582 |
+
"""
|
| 583 |
+
raise NotImplementedError()
|
| 584 |
+
|
| 585 |
+
def map(self, fn, *iterables, timeout=None, chunksize=1):
|
| 586 |
+
"""Returns an iterator equivalent to map(fn, iter).
|
| 587 |
+
|
| 588 |
+
Args:
|
| 589 |
+
fn: A callable that will take as many arguments as there are
|
| 590 |
+
passed iterables.
|
| 591 |
+
timeout: The maximum number of seconds to wait. If None, then there
|
| 592 |
+
is no limit on the wait time.
|
| 593 |
+
chunksize: The size of the chunks the iterable will be broken into
|
| 594 |
+
before being passed to a child process. This argument is only
|
| 595 |
+
used by ProcessPoolExecutor; it is ignored by
|
| 596 |
+
ThreadPoolExecutor.
|
| 597 |
+
|
| 598 |
+
Returns:
|
| 599 |
+
An iterator equivalent to: map(func, *iterables) but the calls may
|
| 600 |
+
be evaluated out-of-order.
|
| 601 |
+
|
| 602 |
+
Raises:
|
| 603 |
+
TimeoutError: If the entire result iterator could not be generated
|
| 604 |
+
before the given timeout.
|
| 605 |
+
Exception: If fn(*args) raises for any values.
|
| 606 |
+
"""
|
| 607 |
+
if timeout is not None:
|
| 608 |
+
end_time = timeout + time.monotonic()
|
| 609 |
+
|
| 610 |
+
fs = [self.submit(fn, *args) for args in zip(*iterables)]
|
| 611 |
+
|
| 612 |
+
# Yield must be hidden in closure so that the futures are submitted
|
| 613 |
+
# before the first iterator value is required.
|
| 614 |
+
def result_iterator():
|
| 615 |
+
try:
|
| 616 |
+
# reverse to keep finishing order
|
| 617 |
+
fs.reverse()
|
| 618 |
+
while fs:
|
| 619 |
+
# Careful not to keep a reference to the popped future
|
| 620 |
+
if timeout is None:
|
| 621 |
+
yield _result_or_cancel(fs.pop())
|
| 622 |
+
else:
|
| 623 |
+
yield _result_or_cancel(fs.pop(), end_time - time.monotonic())
|
| 624 |
+
finally:
|
| 625 |
+
for future in fs:
|
| 626 |
+
future.cancel()
|
| 627 |
+
return result_iterator()
|
| 628 |
+
|
| 629 |
+
def shutdown(self, wait=True, *, cancel_futures=False):
|
| 630 |
+
"""Clean-up the resources associated with the Executor.
|
| 631 |
+
|
| 632 |
+
It is safe to call this method several times. Otherwise, no other
|
| 633 |
+
methods can be called after this one.
|
| 634 |
+
|
| 635 |
+
Args:
|
| 636 |
+
wait: If True then shutdown will not return until all running
|
| 637 |
+
futures have finished executing and the resources used by the
|
| 638 |
+
executor have been reclaimed.
|
| 639 |
+
cancel_futures: If True then shutdown will cancel all pending
|
| 640 |
+
futures. Futures that are completed or running will not be
|
| 641 |
+
cancelled.
|
| 642 |
+
"""
|
| 643 |
+
pass
|
| 644 |
+
|
| 645 |
+
def __enter__(self):
|
| 646 |
+
return self
|
| 647 |
+
|
| 648 |
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
| 649 |
+
self.shutdown(wait=True)
|
| 650 |
+
return False
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
class BrokenExecutor(RuntimeError):
|
| 654 |
+
"""
|
| 655 |
+
Raised when a executor has become non-functional after a severe failure.
|
| 656 |
+
"""
|
pllava/lib/python3.10/concurrent/futures/process.py
ADDED
|
@@ -0,0 +1,791 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2009 Brian Quinlan. All Rights Reserved.
|
| 2 |
+
# Licensed to PSF under a Contributor Agreement.
|
| 3 |
+
|
| 4 |
+
"""Implements ProcessPoolExecutor.
|
| 5 |
+
|
| 6 |
+
The following diagram and text describe the data-flow through the system:
|
| 7 |
+
|
| 8 |
+
|======================= In-process =====================|== Out-of-process ==|
|
| 9 |
+
|
| 10 |
+
+----------+ +----------+ +--------+ +-----------+ +---------+
|
| 11 |
+
| | => | Work Ids | | | | Call Q | | Process |
|
| 12 |
+
| | +----------+ | | +-----------+ | Pool |
|
| 13 |
+
| | | ... | | | | ... | +---------+
|
| 14 |
+
| | | 6 | => | | => | 5, call() | => | |
|
| 15 |
+
| | | 7 | | | | ... | | |
|
| 16 |
+
| Process | | ... | | Local | +-----------+ | Process |
|
| 17 |
+
| Pool | +----------+ | Worker | | #1..n |
|
| 18 |
+
| Executor | | Thread | | |
|
| 19 |
+
| | +----------- + | | +-----------+ | |
|
| 20 |
+
| | <=> | Work Items | <=> | | <= | Result Q | <= | |
|
| 21 |
+
| | +------------+ | | +-----------+ | |
|
| 22 |
+
| | | 6: call() | | | | ... | | |
|
| 23 |
+
| | | future | | | | 4, result | | |
|
| 24 |
+
| | | ... | | | | 3, except | | |
|
| 25 |
+
+----------+ +------------+ +--------+ +-----------+ +---------+
|
| 26 |
+
|
| 27 |
+
Executor.submit() called:
|
| 28 |
+
- creates a uniquely numbered _WorkItem and adds it to the "Work Items" dict
|
| 29 |
+
- adds the id of the _WorkItem to the "Work Ids" queue
|
| 30 |
+
|
| 31 |
+
Local worker thread:
|
| 32 |
+
- reads work ids from the "Work Ids" queue and looks up the corresponding
|
| 33 |
+
WorkItem from the "Work Items" dict: if the work item has been cancelled then
|
| 34 |
+
it is simply removed from the dict, otherwise it is repackaged as a
|
| 35 |
+
_CallItem and put in the "Call Q". New _CallItems are put in the "Call Q"
|
| 36 |
+
until "Call Q" is full. NOTE: the size of the "Call Q" is kept small because
|
| 37 |
+
calls placed in the "Call Q" can no longer be cancelled with Future.cancel().
|
| 38 |
+
- reads _ResultItems from "Result Q", updates the future stored in the
|
| 39 |
+
"Work Items" dict and deletes the dict entry
|
| 40 |
+
|
| 41 |
+
Process #1..n:
|
| 42 |
+
- reads _CallItems from "Call Q", executes the calls, and puts the resulting
|
| 43 |
+
_ResultItems in "Result Q"
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
|
| 47 |
+
|
| 48 |
+
import os
|
| 49 |
+
from concurrent.futures import _base
|
| 50 |
+
import queue
|
| 51 |
+
import multiprocessing as mp
|
| 52 |
+
import multiprocessing.connection
|
| 53 |
+
from multiprocessing.queues import Queue
|
| 54 |
+
import threading
|
| 55 |
+
import weakref
|
| 56 |
+
from functools import partial
|
| 57 |
+
import itertools
|
| 58 |
+
import sys
|
| 59 |
+
import traceback
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
_threads_wakeups = weakref.WeakKeyDictionary()
|
| 63 |
+
_global_shutdown = False
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
class _ThreadWakeup:
|
| 67 |
+
def __init__(self):
|
| 68 |
+
self._closed = False
|
| 69 |
+
self._reader, self._writer = mp.Pipe(duplex=False)
|
| 70 |
+
|
| 71 |
+
def close(self):
|
| 72 |
+
if not self._closed:
|
| 73 |
+
self._closed = True
|
| 74 |
+
self._writer.close()
|
| 75 |
+
self._reader.close()
|
| 76 |
+
|
| 77 |
+
def wakeup(self):
|
| 78 |
+
if not self._closed:
|
| 79 |
+
self._writer.send_bytes(b"")
|
| 80 |
+
|
| 81 |
+
def clear(self):
|
| 82 |
+
if not self._closed:
|
| 83 |
+
while self._reader.poll():
|
| 84 |
+
self._reader.recv_bytes()
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def _python_exit():
|
| 88 |
+
global _global_shutdown
|
| 89 |
+
_global_shutdown = True
|
| 90 |
+
items = list(_threads_wakeups.items())
|
| 91 |
+
for _, thread_wakeup in items:
|
| 92 |
+
# call not protected by ProcessPoolExecutor._shutdown_lock
|
| 93 |
+
thread_wakeup.wakeup()
|
| 94 |
+
for t, _ in items:
|
| 95 |
+
t.join()
|
| 96 |
+
|
| 97 |
+
# Register for `_python_exit()` to be called just before joining all
|
| 98 |
+
# non-daemon threads. This is used instead of `atexit.register()` for
|
| 99 |
+
# compatibility with subinterpreters, which no longer support daemon threads.
|
| 100 |
+
# See bpo-39812 for context.
|
| 101 |
+
threading._register_atexit(_python_exit)
|
| 102 |
+
|
| 103 |
+
# Controls how many more calls than processes will be queued in the call queue.
|
| 104 |
+
# A smaller number will mean that processes spend more time idle waiting for
|
| 105 |
+
# work while a larger number will make Future.cancel() succeed less frequently
|
| 106 |
+
# (Futures in the call queue cannot be cancelled).
|
| 107 |
+
EXTRA_QUEUED_CALLS = 1
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
# On Windows, WaitForMultipleObjects is used to wait for processes to finish.
|
| 111 |
+
# It can wait on, at most, 63 objects. There is an overhead of two objects:
|
| 112 |
+
# - the result queue reader
|
| 113 |
+
# - the thread wakeup reader
|
| 114 |
+
_MAX_WINDOWS_WORKERS = 63 - 2
|
| 115 |
+
|
| 116 |
+
# Hack to embed stringification of remote traceback in local traceback
|
| 117 |
+
|
| 118 |
+
class _RemoteTraceback(Exception):
|
| 119 |
+
def __init__(self, tb):
|
| 120 |
+
self.tb = tb
|
| 121 |
+
def __str__(self):
|
| 122 |
+
return self.tb
|
| 123 |
+
|
| 124 |
+
class _ExceptionWithTraceback:
|
| 125 |
+
def __init__(self, exc, tb):
|
| 126 |
+
tb = traceback.format_exception(type(exc), exc, tb)
|
| 127 |
+
tb = ''.join(tb)
|
| 128 |
+
self.exc = exc
|
| 129 |
+
# Traceback object needs to be garbage-collected as its frames
|
| 130 |
+
# contain references to all the objects in the exception scope
|
| 131 |
+
self.exc.__traceback__ = None
|
| 132 |
+
self.tb = '\n"""\n%s"""' % tb
|
| 133 |
+
def __reduce__(self):
|
| 134 |
+
return _rebuild_exc, (self.exc, self.tb)
|
| 135 |
+
|
| 136 |
+
def _rebuild_exc(exc, tb):
|
| 137 |
+
exc.__cause__ = _RemoteTraceback(tb)
|
| 138 |
+
return exc
|
| 139 |
+
|
| 140 |
+
class _WorkItem(object):
|
| 141 |
+
def __init__(self, future, fn, args, kwargs):
|
| 142 |
+
self.future = future
|
| 143 |
+
self.fn = fn
|
| 144 |
+
self.args = args
|
| 145 |
+
self.kwargs = kwargs
|
| 146 |
+
|
| 147 |
+
class _ResultItem(object):
|
| 148 |
+
def __init__(self, work_id, exception=None, result=None):
|
| 149 |
+
self.work_id = work_id
|
| 150 |
+
self.exception = exception
|
| 151 |
+
self.result = result
|
| 152 |
+
|
| 153 |
+
class _CallItem(object):
|
| 154 |
+
def __init__(self, work_id, fn, args, kwargs):
|
| 155 |
+
self.work_id = work_id
|
| 156 |
+
self.fn = fn
|
| 157 |
+
self.args = args
|
| 158 |
+
self.kwargs = kwargs
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
class _SafeQueue(Queue):
|
| 162 |
+
"""Safe Queue set exception to the future object linked to a job"""
|
| 163 |
+
def __init__(self, max_size=0, *, ctx, pending_work_items, shutdown_lock,
|
| 164 |
+
thread_wakeup):
|
| 165 |
+
self.pending_work_items = pending_work_items
|
| 166 |
+
self.shutdown_lock = shutdown_lock
|
| 167 |
+
self.thread_wakeup = thread_wakeup
|
| 168 |
+
super().__init__(max_size, ctx=ctx)
|
| 169 |
+
|
| 170 |
+
def _on_queue_feeder_error(self, e, obj):
|
| 171 |
+
if isinstance(obj, _CallItem):
|
| 172 |
+
tb = traceback.format_exception(type(e), e, e.__traceback__)
|
| 173 |
+
e.__cause__ = _RemoteTraceback('\n"""\n{}"""'.format(''.join(tb)))
|
| 174 |
+
work_item = self.pending_work_items.pop(obj.work_id, None)
|
| 175 |
+
with self.shutdown_lock:
|
| 176 |
+
self.thread_wakeup.wakeup()
|
| 177 |
+
# work_item can be None if another process terminated. In this
|
| 178 |
+
# case, the executor_manager_thread fails all work_items
|
| 179 |
+
# with BrokenProcessPool
|
| 180 |
+
if work_item is not None:
|
| 181 |
+
work_item.future.set_exception(e)
|
| 182 |
+
else:
|
| 183 |
+
super()._on_queue_feeder_error(e, obj)
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
def _get_chunks(*iterables, chunksize):
|
| 187 |
+
""" Iterates over zip()ed iterables in chunks. """
|
| 188 |
+
it = zip(*iterables)
|
| 189 |
+
while True:
|
| 190 |
+
chunk = tuple(itertools.islice(it, chunksize))
|
| 191 |
+
if not chunk:
|
| 192 |
+
return
|
| 193 |
+
yield chunk
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
def _process_chunk(fn, chunk):
|
| 197 |
+
""" Processes a chunk of an iterable passed to map.
|
| 198 |
+
|
| 199 |
+
Runs the function passed to map() on a chunk of the
|
| 200 |
+
iterable passed to map.
|
| 201 |
+
|
| 202 |
+
This function is run in a separate process.
|
| 203 |
+
|
| 204 |
+
"""
|
| 205 |
+
return [fn(*args) for args in chunk]
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
def _sendback_result(result_queue, work_id, result=None, exception=None):
|
| 209 |
+
"""Safely send back the given result or exception"""
|
| 210 |
+
try:
|
| 211 |
+
result_queue.put(_ResultItem(work_id, result=result,
|
| 212 |
+
exception=exception))
|
| 213 |
+
except BaseException as e:
|
| 214 |
+
exc = _ExceptionWithTraceback(e, e.__traceback__)
|
| 215 |
+
result_queue.put(_ResultItem(work_id, exception=exc))
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
def _process_worker(call_queue, result_queue, initializer, initargs):
|
| 219 |
+
"""Evaluates calls from call_queue and places the results in result_queue.
|
| 220 |
+
|
| 221 |
+
This worker is run in a separate process.
|
| 222 |
+
|
| 223 |
+
Args:
|
| 224 |
+
call_queue: A ctx.Queue of _CallItems that will be read and
|
| 225 |
+
evaluated by the worker.
|
| 226 |
+
result_queue: A ctx.Queue of _ResultItems that will written
|
| 227 |
+
to by the worker.
|
| 228 |
+
initializer: A callable initializer, or None
|
| 229 |
+
initargs: A tuple of args for the initializer
|
| 230 |
+
"""
|
| 231 |
+
if initializer is not None:
|
| 232 |
+
try:
|
| 233 |
+
initializer(*initargs)
|
| 234 |
+
except BaseException:
|
| 235 |
+
_base.LOGGER.critical('Exception in initializer:', exc_info=True)
|
| 236 |
+
# The parent will notice that the process stopped and
|
| 237 |
+
# mark the pool broken
|
| 238 |
+
return
|
| 239 |
+
while True:
|
| 240 |
+
call_item = call_queue.get(block=True)
|
| 241 |
+
if call_item is None:
|
| 242 |
+
# Wake up queue management thread
|
| 243 |
+
result_queue.put(os.getpid())
|
| 244 |
+
return
|
| 245 |
+
try:
|
| 246 |
+
r = call_item.fn(*call_item.args, **call_item.kwargs)
|
| 247 |
+
except BaseException as e:
|
| 248 |
+
exc = _ExceptionWithTraceback(e, e.__traceback__)
|
| 249 |
+
_sendback_result(result_queue, call_item.work_id, exception=exc)
|
| 250 |
+
else:
|
| 251 |
+
_sendback_result(result_queue, call_item.work_id, result=r)
|
| 252 |
+
del r
|
| 253 |
+
|
| 254 |
+
# Liberate the resource as soon as possible, to avoid holding onto
|
| 255 |
+
# open files or shared memory that is not needed anymore
|
| 256 |
+
del call_item
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
class _ExecutorManagerThread(threading.Thread):
|
| 260 |
+
"""Manages the communication between this process and the worker processes.
|
| 261 |
+
|
| 262 |
+
The manager is run in a local thread.
|
| 263 |
+
|
| 264 |
+
Args:
|
| 265 |
+
executor: A reference to the ProcessPoolExecutor that owns
|
| 266 |
+
this thread. A weakref will be own by the manager as well as
|
| 267 |
+
references to internal objects used to introspect the state of
|
| 268 |
+
the executor.
|
| 269 |
+
"""
|
| 270 |
+
|
| 271 |
+
def __init__(self, executor):
|
| 272 |
+
# Store references to necessary internals of the executor.
|
| 273 |
+
|
| 274 |
+
# A _ThreadWakeup to allow waking up the queue_manager_thread from the
|
| 275 |
+
# main Thread and avoid deadlocks caused by permanently locked queues.
|
| 276 |
+
self.thread_wakeup = executor._executor_manager_thread_wakeup
|
| 277 |
+
self.shutdown_lock = executor._shutdown_lock
|
| 278 |
+
|
| 279 |
+
# A weakref.ref to the ProcessPoolExecutor that owns this thread. Used
|
| 280 |
+
# to determine if the ProcessPoolExecutor has been garbage collected
|
| 281 |
+
# and that the manager can exit.
|
| 282 |
+
# When the executor gets garbage collected, the weakref callback
|
| 283 |
+
# will wake up the queue management thread so that it can terminate
|
| 284 |
+
# if there is no pending work item.
|
| 285 |
+
def weakref_cb(_,
|
| 286 |
+
thread_wakeup=self.thread_wakeup,
|
| 287 |
+
shutdown_lock=self.shutdown_lock):
|
| 288 |
+
mp.util.debug('Executor collected: triggering callback for'
|
| 289 |
+
' QueueManager wakeup')
|
| 290 |
+
with shutdown_lock:
|
| 291 |
+
thread_wakeup.wakeup()
|
| 292 |
+
|
| 293 |
+
self.executor_reference = weakref.ref(executor, weakref_cb)
|
| 294 |
+
|
| 295 |
+
# A list of the ctx.Process instances used as workers.
|
| 296 |
+
self.processes = executor._processes
|
| 297 |
+
|
| 298 |
+
# A ctx.Queue that will be filled with _CallItems derived from
|
| 299 |
+
# _WorkItems for processing by the process workers.
|
| 300 |
+
self.call_queue = executor._call_queue
|
| 301 |
+
|
| 302 |
+
# A ctx.SimpleQueue of _ResultItems generated by the process workers.
|
| 303 |
+
self.result_queue = executor._result_queue
|
| 304 |
+
|
| 305 |
+
# A queue.Queue of work ids e.g. Queue([5, 6, ...]).
|
| 306 |
+
self.work_ids_queue = executor._work_ids
|
| 307 |
+
|
| 308 |
+
# A dict mapping work ids to _WorkItems e.g.
|
| 309 |
+
# {5: <_WorkItem...>, 6: <_WorkItem...>, ...}
|
| 310 |
+
self.pending_work_items = executor._pending_work_items
|
| 311 |
+
|
| 312 |
+
super().__init__()
|
| 313 |
+
|
| 314 |
+
def run(self):
|
| 315 |
+
# Main loop for the executor manager thread.
|
| 316 |
+
|
| 317 |
+
while True:
|
| 318 |
+
self.add_call_item_to_queue()
|
| 319 |
+
|
| 320 |
+
result_item, is_broken, cause = self.wait_result_broken_or_wakeup()
|
| 321 |
+
|
| 322 |
+
if is_broken:
|
| 323 |
+
self.terminate_broken(cause)
|
| 324 |
+
return
|
| 325 |
+
if result_item is not None:
|
| 326 |
+
self.process_result_item(result_item)
|
| 327 |
+
# Delete reference to result_item to avoid keeping references
|
| 328 |
+
# while waiting on new results.
|
| 329 |
+
del result_item
|
| 330 |
+
|
| 331 |
+
# attempt to increment idle process count
|
| 332 |
+
executor = self.executor_reference()
|
| 333 |
+
if executor is not None:
|
| 334 |
+
executor._idle_worker_semaphore.release()
|
| 335 |
+
del executor
|
| 336 |
+
|
| 337 |
+
if self.is_shutting_down():
|
| 338 |
+
self.flag_executor_shutting_down()
|
| 339 |
+
|
| 340 |
+
# When only canceled futures remain in pending_work_items, our
|
| 341 |
+
# next call to wait_result_broken_or_wakeup would hang forever.
|
| 342 |
+
# This makes sure we have some running futures or none at all.
|
| 343 |
+
self.add_call_item_to_queue()
|
| 344 |
+
|
| 345 |
+
# Since no new work items can be added, it is safe to shutdown
|
| 346 |
+
# this thread if there are no pending work items.
|
| 347 |
+
if not self.pending_work_items:
|
| 348 |
+
self.join_executor_internals()
|
| 349 |
+
return
|
| 350 |
+
|
| 351 |
+
def add_call_item_to_queue(self):
|
| 352 |
+
# Fills call_queue with _WorkItems from pending_work_items.
|
| 353 |
+
# This function never blocks.
|
| 354 |
+
while True:
|
| 355 |
+
if self.call_queue.full():
|
| 356 |
+
return
|
| 357 |
+
try:
|
| 358 |
+
work_id = self.work_ids_queue.get(block=False)
|
| 359 |
+
except queue.Empty:
|
| 360 |
+
return
|
| 361 |
+
else:
|
| 362 |
+
work_item = self.pending_work_items[work_id]
|
| 363 |
+
|
| 364 |
+
if work_item.future.set_running_or_notify_cancel():
|
| 365 |
+
self.call_queue.put(_CallItem(work_id,
|
| 366 |
+
work_item.fn,
|
| 367 |
+
work_item.args,
|
| 368 |
+
work_item.kwargs),
|
| 369 |
+
block=True)
|
| 370 |
+
else:
|
| 371 |
+
del self.pending_work_items[work_id]
|
| 372 |
+
continue
|
| 373 |
+
|
| 374 |
+
def wait_result_broken_or_wakeup(self):
|
| 375 |
+
# Wait for a result to be ready in the result_queue while checking
|
| 376 |
+
# that all worker processes are still running, or for a wake up
|
| 377 |
+
# signal send. The wake up signals come either from new tasks being
|
| 378 |
+
# submitted, from the executor being shutdown/gc-ed, or from the
|
| 379 |
+
# shutdown of the python interpreter.
|
| 380 |
+
result_reader = self.result_queue._reader
|
| 381 |
+
assert not self.thread_wakeup._closed
|
| 382 |
+
wakeup_reader = self.thread_wakeup._reader
|
| 383 |
+
readers = [result_reader, wakeup_reader]
|
| 384 |
+
worker_sentinels = [p.sentinel for p in list(self.processes.values())]
|
| 385 |
+
ready = mp.connection.wait(readers + worker_sentinels)
|
| 386 |
+
|
| 387 |
+
cause = None
|
| 388 |
+
is_broken = True
|
| 389 |
+
result_item = None
|
| 390 |
+
if result_reader in ready:
|
| 391 |
+
try:
|
| 392 |
+
result_item = result_reader.recv()
|
| 393 |
+
is_broken = False
|
| 394 |
+
except BaseException as e:
|
| 395 |
+
cause = traceback.format_exception(type(e), e, e.__traceback__)
|
| 396 |
+
|
| 397 |
+
elif wakeup_reader in ready:
|
| 398 |
+
is_broken = False
|
| 399 |
+
|
| 400 |
+
with self.shutdown_lock:
|
| 401 |
+
self.thread_wakeup.clear()
|
| 402 |
+
|
| 403 |
+
return result_item, is_broken, cause
|
| 404 |
+
|
| 405 |
+
def process_result_item(self, result_item):
|
| 406 |
+
# Process the received a result_item. This can be either the PID of a
|
| 407 |
+
# worker that exited gracefully or a _ResultItem
|
| 408 |
+
|
| 409 |
+
if isinstance(result_item, int):
|
| 410 |
+
# Clean shutdown of a worker using its PID
|
| 411 |
+
# (avoids marking the executor broken)
|
| 412 |
+
assert self.is_shutting_down()
|
| 413 |
+
p = self.processes.pop(result_item)
|
| 414 |
+
p.join()
|
| 415 |
+
if not self.processes:
|
| 416 |
+
self.join_executor_internals()
|
| 417 |
+
return
|
| 418 |
+
else:
|
| 419 |
+
# Received a _ResultItem so mark the future as completed.
|
| 420 |
+
work_item = self.pending_work_items.pop(result_item.work_id, None)
|
| 421 |
+
# work_item can be None if another process terminated (see above)
|
| 422 |
+
if work_item is not None:
|
| 423 |
+
if result_item.exception:
|
| 424 |
+
work_item.future.set_exception(result_item.exception)
|
| 425 |
+
else:
|
| 426 |
+
work_item.future.set_result(result_item.result)
|
| 427 |
+
|
| 428 |
+
def is_shutting_down(self):
|
| 429 |
+
# Check whether we should start shutting down the executor.
|
| 430 |
+
executor = self.executor_reference()
|
| 431 |
+
# No more work items can be added if:
|
| 432 |
+
# - The interpreter is shutting down OR
|
| 433 |
+
# - The executor that owns this worker has been collected OR
|
| 434 |
+
# - The executor that owns this worker has been shutdown.
|
| 435 |
+
return (_global_shutdown or executor is None
|
| 436 |
+
or executor._shutdown_thread)
|
| 437 |
+
|
| 438 |
+
def terminate_broken(self, cause):
|
| 439 |
+
# Terminate the executor because it is in a broken state. The cause
|
| 440 |
+
# argument can be used to display more information on the error that
|
| 441 |
+
# lead the executor into becoming broken.
|
| 442 |
+
|
| 443 |
+
# Mark the process pool broken so that submits fail right now.
|
| 444 |
+
executor = self.executor_reference()
|
| 445 |
+
if executor is not None:
|
| 446 |
+
executor._broken = ('A child process terminated '
|
| 447 |
+
'abruptly, the process pool is not '
|
| 448 |
+
'usable anymore')
|
| 449 |
+
executor._shutdown_thread = True
|
| 450 |
+
executor = None
|
| 451 |
+
|
| 452 |
+
# All pending tasks are to be marked failed with the following
|
| 453 |
+
# BrokenProcessPool error
|
| 454 |
+
bpe = BrokenProcessPool("A process in the process pool was "
|
| 455 |
+
"terminated abruptly while the future was "
|
| 456 |
+
"running or pending.")
|
| 457 |
+
if cause is not None:
|
| 458 |
+
bpe.__cause__ = _RemoteTraceback(
|
| 459 |
+
f"\n'''\n{''.join(cause)}'''")
|
| 460 |
+
|
| 461 |
+
# Mark pending tasks as failed.
|
| 462 |
+
for work_id, work_item in self.pending_work_items.items():
|
| 463 |
+
work_item.future.set_exception(bpe)
|
| 464 |
+
# Delete references to object. See issue16284
|
| 465 |
+
del work_item
|
| 466 |
+
self.pending_work_items.clear()
|
| 467 |
+
|
| 468 |
+
# Terminate remaining workers forcibly: the queues or their
|
| 469 |
+
# locks may be in a dirty state and block forever.
|
| 470 |
+
for p in self.processes.values():
|
| 471 |
+
p.terminate()
|
| 472 |
+
|
| 473 |
+
# clean up resources
|
| 474 |
+
self.join_executor_internals()
|
| 475 |
+
|
| 476 |
+
def flag_executor_shutting_down(self):
|
| 477 |
+
# Flag the executor as shutting down and cancel remaining tasks if
|
| 478 |
+
# requested as early as possible if it is not gc-ed yet.
|
| 479 |
+
executor = self.executor_reference()
|
| 480 |
+
if executor is not None:
|
| 481 |
+
executor._shutdown_thread = True
|
| 482 |
+
# Cancel pending work items if requested.
|
| 483 |
+
if executor._cancel_pending_futures:
|
| 484 |
+
# Cancel all pending futures and update pending_work_items
|
| 485 |
+
# to only have futures that are currently running.
|
| 486 |
+
new_pending_work_items = {}
|
| 487 |
+
for work_id, work_item in self.pending_work_items.items():
|
| 488 |
+
if not work_item.future.cancel():
|
| 489 |
+
new_pending_work_items[work_id] = work_item
|
| 490 |
+
self.pending_work_items = new_pending_work_items
|
| 491 |
+
# Drain work_ids_queue since we no longer need to
|
| 492 |
+
# add items to the call queue.
|
| 493 |
+
while True:
|
| 494 |
+
try:
|
| 495 |
+
self.work_ids_queue.get_nowait()
|
| 496 |
+
except queue.Empty:
|
| 497 |
+
break
|
| 498 |
+
# Make sure we do this only once to not waste time looping
|
| 499 |
+
# on running processes over and over.
|
| 500 |
+
executor._cancel_pending_futures = False
|
| 501 |
+
|
| 502 |
+
def shutdown_workers(self):
|
| 503 |
+
n_children_to_stop = self.get_n_children_alive()
|
| 504 |
+
n_sentinels_sent = 0
|
| 505 |
+
# Send the right number of sentinels, to make sure all children are
|
| 506 |
+
# properly terminated.
|
| 507 |
+
while (n_sentinels_sent < n_children_to_stop
|
| 508 |
+
and self.get_n_children_alive() > 0):
|
| 509 |
+
for i in range(n_children_to_stop - n_sentinels_sent):
|
| 510 |
+
try:
|
| 511 |
+
self.call_queue.put_nowait(None)
|
| 512 |
+
n_sentinels_sent += 1
|
| 513 |
+
except queue.Full:
|
| 514 |
+
break
|
| 515 |
+
|
| 516 |
+
def join_executor_internals(self):
|
| 517 |
+
self.shutdown_workers()
|
| 518 |
+
# Release the queue's resources as soon as possible.
|
| 519 |
+
self.call_queue.close()
|
| 520 |
+
self.call_queue.join_thread()
|
| 521 |
+
with self.shutdown_lock:
|
| 522 |
+
self.thread_wakeup.close()
|
| 523 |
+
# If .join() is not called on the created processes then
|
| 524 |
+
# some ctx.Queue methods may deadlock on Mac OS X.
|
| 525 |
+
for p in self.processes.values():
|
| 526 |
+
p.join()
|
| 527 |
+
|
| 528 |
+
def get_n_children_alive(self):
|
| 529 |
+
# This is an upper bound on the number of children alive.
|
| 530 |
+
return sum(p.is_alive() for p in self.processes.values())
|
| 531 |
+
|
| 532 |
+
|
| 533 |
+
_system_limits_checked = False
|
| 534 |
+
_system_limited = None
|
| 535 |
+
|
| 536 |
+
|
| 537 |
+
def _check_system_limits():
|
| 538 |
+
global _system_limits_checked, _system_limited
|
| 539 |
+
if _system_limits_checked:
|
| 540 |
+
if _system_limited:
|
| 541 |
+
raise NotImplementedError(_system_limited)
|
| 542 |
+
_system_limits_checked = True
|
| 543 |
+
try:
|
| 544 |
+
import multiprocessing.synchronize
|
| 545 |
+
except ImportError:
|
| 546 |
+
_system_limited = (
|
| 547 |
+
"This Python build lacks multiprocessing.synchronize, usually due "
|
| 548 |
+
"to named semaphores being unavailable on this platform."
|
| 549 |
+
)
|
| 550 |
+
raise NotImplementedError(_system_limited)
|
| 551 |
+
try:
|
| 552 |
+
nsems_max = os.sysconf("SC_SEM_NSEMS_MAX")
|
| 553 |
+
except (AttributeError, ValueError):
|
| 554 |
+
# sysconf not available or setting not available
|
| 555 |
+
return
|
| 556 |
+
if nsems_max == -1:
|
| 557 |
+
# indetermined limit, assume that limit is determined
|
| 558 |
+
# by available memory only
|
| 559 |
+
return
|
| 560 |
+
if nsems_max >= 256:
|
| 561 |
+
# minimum number of semaphores available
|
| 562 |
+
# according to POSIX
|
| 563 |
+
return
|
| 564 |
+
_system_limited = ("system provides too few semaphores (%d"
|
| 565 |
+
" available, 256 necessary)" % nsems_max)
|
| 566 |
+
raise NotImplementedError(_system_limited)
|
| 567 |
+
|
| 568 |
+
|
| 569 |
+
def _chain_from_iterable_of_lists(iterable):
|
| 570 |
+
"""
|
| 571 |
+
Specialized implementation of itertools.chain.from_iterable.
|
| 572 |
+
Each item in *iterable* should be a list. This function is
|
| 573 |
+
careful not to keep references to yielded objects.
|
| 574 |
+
"""
|
| 575 |
+
for element in iterable:
|
| 576 |
+
element.reverse()
|
| 577 |
+
while element:
|
| 578 |
+
yield element.pop()
|
| 579 |
+
|
| 580 |
+
|
| 581 |
+
class BrokenProcessPool(_base.BrokenExecutor):
|
| 582 |
+
"""
|
| 583 |
+
Raised when a process in a ProcessPoolExecutor terminated abruptly
|
| 584 |
+
while a future was in the running state.
|
| 585 |
+
"""
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
class ProcessPoolExecutor(_base.Executor):
|
| 589 |
+
def __init__(self, max_workers=None, mp_context=None,
|
| 590 |
+
initializer=None, initargs=()):
|
| 591 |
+
"""Initializes a new ProcessPoolExecutor instance.
|
| 592 |
+
|
| 593 |
+
Args:
|
| 594 |
+
max_workers: The maximum number of processes that can be used to
|
| 595 |
+
execute the given calls. If None or not given then as many
|
| 596 |
+
worker processes will be created as the machine has processors.
|
| 597 |
+
mp_context: A multiprocessing context to launch the workers. This
|
| 598 |
+
object should provide SimpleQueue, Queue and Process.
|
| 599 |
+
initializer: A callable used to initialize worker processes.
|
| 600 |
+
initargs: A tuple of arguments to pass to the initializer.
|
| 601 |
+
"""
|
| 602 |
+
_check_system_limits()
|
| 603 |
+
|
| 604 |
+
if max_workers is None:
|
| 605 |
+
self._max_workers = os.cpu_count() or 1
|
| 606 |
+
if sys.platform == 'win32':
|
| 607 |
+
self._max_workers = min(_MAX_WINDOWS_WORKERS,
|
| 608 |
+
self._max_workers)
|
| 609 |
+
else:
|
| 610 |
+
if max_workers <= 0:
|
| 611 |
+
raise ValueError("max_workers must be greater than 0")
|
| 612 |
+
elif (sys.platform == 'win32' and
|
| 613 |
+
max_workers > _MAX_WINDOWS_WORKERS):
|
| 614 |
+
raise ValueError(
|
| 615 |
+
f"max_workers must be <= {_MAX_WINDOWS_WORKERS}")
|
| 616 |
+
|
| 617 |
+
self._max_workers = max_workers
|
| 618 |
+
|
| 619 |
+
if mp_context is None:
|
| 620 |
+
mp_context = mp.get_context()
|
| 621 |
+
self._mp_context = mp_context
|
| 622 |
+
|
| 623 |
+
# https://github.com/python/cpython/issues/90622
|
| 624 |
+
self._safe_to_dynamically_spawn_children = (
|
| 625 |
+
self._mp_context.get_start_method(allow_none=False) != "fork")
|
| 626 |
+
|
| 627 |
+
if initializer is not None and not callable(initializer):
|
| 628 |
+
raise TypeError("initializer must be a callable")
|
| 629 |
+
self._initializer = initializer
|
| 630 |
+
self._initargs = initargs
|
| 631 |
+
|
| 632 |
+
# Management thread
|
| 633 |
+
self._executor_manager_thread = None
|
| 634 |
+
|
| 635 |
+
# Map of pids to processes
|
| 636 |
+
self._processes = {}
|
| 637 |
+
|
| 638 |
+
# Shutdown is a two-step process.
|
| 639 |
+
self._shutdown_thread = False
|
| 640 |
+
self._shutdown_lock = threading.Lock()
|
| 641 |
+
self._idle_worker_semaphore = threading.Semaphore(0)
|
| 642 |
+
self._broken = False
|
| 643 |
+
self._queue_count = 0
|
| 644 |
+
self._pending_work_items = {}
|
| 645 |
+
self._cancel_pending_futures = False
|
| 646 |
+
|
| 647 |
+
# _ThreadWakeup is a communication channel used to interrupt the wait
|
| 648 |
+
# of the main loop of executor_manager_thread from another thread (e.g.
|
| 649 |
+
# when calling executor.submit or executor.shutdown). We do not use the
|
| 650 |
+
# _result_queue to send wakeup signals to the executor_manager_thread
|
| 651 |
+
# as it could result in a deadlock if a worker process dies with the
|
| 652 |
+
# _result_queue write lock still acquired.
|
| 653 |
+
#
|
| 654 |
+
# _shutdown_lock must be locked to access _ThreadWakeup.
|
| 655 |
+
self._executor_manager_thread_wakeup = _ThreadWakeup()
|
| 656 |
+
|
| 657 |
+
# Create communication channels for the executor
|
| 658 |
+
# Make the call queue slightly larger than the number of processes to
|
| 659 |
+
# prevent the worker processes from idling. But don't make it too big
|
| 660 |
+
# because futures in the call queue cannot be cancelled.
|
| 661 |
+
queue_size = self._max_workers + EXTRA_QUEUED_CALLS
|
| 662 |
+
self._call_queue = _SafeQueue(
|
| 663 |
+
max_size=queue_size, ctx=self._mp_context,
|
| 664 |
+
pending_work_items=self._pending_work_items,
|
| 665 |
+
shutdown_lock=self._shutdown_lock,
|
| 666 |
+
thread_wakeup=self._executor_manager_thread_wakeup)
|
| 667 |
+
# Killed worker processes can produce spurious "broken pipe"
|
| 668 |
+
# tracebacks in the queue's own worker thread. But we detect killed
|
| 669 |
+
# processes anyway, so silence the tracebacks.
|
| 670 |
+
self._call_queue._ignore_epipe = True
|
| 671 |
+
self._result_queue = mp_context.SimpleQueue()
|
| 672 |
+
self._work_ids = queue.Queue()
|
| 673 |
+
|
| 674 |
+
def _start_executor_manager_thread(self):
|
| 675 |
+
if self._executor_manager_thread is None:
|
| 676 |
+
# Start the processes so that their sentinels are known.
|
| 677 |
+
if not self._safe_to_dynamically_spawn_children: # ie, using fork.
|
| 678 |
+
self._launch_processes()
|
| 679 |
+
self._executor_manager_thread = _ExecutorManagerThread(self)
|
| 680 |
+
self._executor_manager_thread.start()
|
| 681 |
+
_threads_wakeups[self._executor_manager_thread] = \
|
| 682 |
+
self._executor_manager_thread_wakeup
|
| 683 |
+
|
| 684 |
+
def _adjust_process_count(self):
|
| 685 |
+
# if there's an idle process, we don't need to spawn a new one.
|
| 686 |
+
if self._idle_worker_semaphore.acquire(blocking=False):
|
| 687 |
+
return
|
| 688 |
+
|
| 689 |
+
process_count = len(self._processes)
|
| 690 |
+
if process_count < self._max_workers:
|
| 691 |
+
# Assertion disabled as this codepath is also used to replace a
|
| 692 |
+
# worker that unexpectedly dies, even when using the 'fork' start
|
| 693 |
+
# method. That means there is still a potential deadlock bug. If a
|
| 694 |
+
# 'fork' mp_context worker dies, we'll be forking a new one when
|
| 695 |
+
# we know a thread is running (self._executor_manager_thread).
|
| 696 |
+
#assert self._safe_to_dynamically_spawn_children or not self._executor_manager_thread, 'https://github.com/python/cpython/issues/90622'
|
| 697 |
+
self._spawn_process()
|
| 698 |
+
|
| 699 |
+
def _launch_processes(self):
|
| 700 |
+
# https://github.com/python/cpython/issues/90622
|
| 701 |
+
assert not self._executor_manager_thread, (
|
| 702 |
+
'Processes cannot be fork()ed after the thread has started, '
|
| 703 |
+
'deadlock in the child processes could result.')
|
| 704 |
+
for _ in range(len(self._processes), self._max_workers):
|
| 705 |
+
self._spawn_process()
|
| 706 |
+
|
| 707 |
+
def _spawn_process(self):
|
| 708 |
+
p = self._mp_context.Process(
|
| 709 |
+
target=_process_worker,
|
| 710 |
+
args=(self._call_queue,
|
| 711 |
+
self._result_queue,
|
| 712 |
+
self._initializer,
|
| 713 |
+
self._initargs))
|
| 714 |
+
p.start()
|
| 715 |
+
self._processes[p.pid] = p
|
| 716 |
+
|
| 717 |
+
def submit(self, fn, /, *args, **kwargs):
|
| 718 |
+
with self._shutdown_lock:
|
| 719 |
+
if self._broken:
|
| 720 |
+
raise BrokenProcessPool(self._broken)
|
| 721 |
+
if self._shutdown_thread:
|
| 722 |
+
raise RuntimeError('cannot schedule new futures after shutdown')
|
| 723 |
+
if _global_shutdown:
|
| 724 |
+
raise RuntimeError('cannot schedule new futures after '
|
| 725 |
+
'interpreter shutdown')
|
| 726 |
+
|
| 727 |
+
f = _base.Future()
|
| 728 |
+
w = _WorkItem(f, fn, args, kwargs)
|
| 729 |
+
|
| 730 |
+
self._pending_work_items[self._queue_count] = w
|
| 731 |
+
self._work_ids.put(self._queue_count)
|
| 732 |
+
self._queue_count += 1
|
| 733 |
+
# Wake up queue management thread
|
| 734 |
+
self._executor_manager_thread_wakeup.wakeup()
|
| 735 |
+
|
| 736 |
+
if self._safe_to_dynamically_spawn_children:
|
| 737 |
+
self._adjust_process_count()
|
| 738 |
+
self._start_executor_manager_thread()
|
| 739 |
+
return f
|
| 740 |
+
submit.__doc__ = _base.Executor.submit.__doc__
|
| 741 |
+
|
| 742 |
+
def map(self, fn, *iterables, timeout=None, chunksize=1):
|
| 743 |
+
"""Returns an iterator equivalent to map(fn, iter).
|
| 744 |
+
|
| 745 |
+
Args:
|
| 746 |
+
fn: A callable that will take as many arguments as there are
|
| 747 |
+
passed iterables.
|
| 748 |
+
timeout: The maximum number of seconds to wait. If None, then there
|
| 749 |
+
is no limit on the wait time.
|
| 750 |
+
chunksize: If greater than one, the iterables will be chopped into
|
| 751 |
+
chunks of size chunksize and submitted to the process pool.
|
| 752 |
+
If set to one, the items in the list will be sent one at a time.
|
| 753 |
+
|
| 754 |
+
Returns:
|
| 755 |
+
An iterator equivalent to: map(func, *iterables) but the calls may
|
| 756 |
+
be evaluated out-of-order.
|
| 757 |
+
|
| 758 |
+
Raises:
|
| 759 |
+
TimeoutError: If the entire result iterator could not be generated
|
| 760 |
+
before the given timeout.
|
| 761 |
+
Exception: If fn(*args) raises for any values.
|
| 762 |
+
"""
|
| 763 |
+
if chunksize < 1:
|
| 764 |
+
raise ValueError("chunksize must be >= 1.")
|
| 765 |
+
|
| 766 |
+
results = super().map(partial(_process_chunk, fn),
|
| 767 |
+
_get_chunks(*iterables, chunksize=chunksize),
|
| 768 |
+
timeout=timeout)
|
| 769 |
+
return _chain_from_iterable_of_lists(results)
|
| 770 |
+
|
| 771 |
+
def shutdown(self, wait=True, *, cancel_futures=False):
|
| 772 |
+
with self._shutdown_lock:
|
| 773 |
+
self._cancel_pending_futures = cancel_futures
|
| 774 |
+
self._shutdown_thread = True
|
| 775 |
+
if self._executor_manager_thread_wakeup is not None:
|
| 776 |
+
# Wake up queue management thread
|
| 777 |
+
self._executor_manager_thread_wakeup.wakeup()
|
| 778 |
+
|
| 779 |
+
if self._executor_manager_thread is not None and wait:
|
| 780 |
+
self._executor_manager_thread.join()
|
| 781 |
+
# To reduce the risk of opening too many files, remove references to
|
| 782 |
+
# objects that use file descriptors.
|
| 783 |
+
self._executor_manager_thread = None
|
| 784 |
+
self._call_queue = None
|
| 785 |
+
if self._result_queue is not None and wait:
|
| 786 |
+
self._result_queue.close()
|
| 787 |
+
self._result_queue = None
|
| 788 |
+
self._processes = None
|
| 789 |
+
self._executor_manager_thread_wakeup = None
|
| 790 |
+
|
| 791 |
+
shutdown.__doc__ = _base.Executor.shutdown.__doc__
|
pllava/lib/python3.10/concurrent/futures/thread.py
ADDED
|
@@ -0,0 +1,236 @@
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2009 Brian Quinlan. All Rights Reserved.
|
| 2 |
+
# Licensed to PSF under a Contributor Agreement.
|
| 3 |
+
|
| 4 |
+
"""Implements ThreadPoolExecutor."""
|
| 5 |
+
|
| 6 |
+
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
|
| 7 |
+
|
| 8 |
+
from concurrent.futures import _base
|
| 9 |
+
import itertools
|
| 10 |
+
import queue
|
| 11 |
+
import threading
|
| 12 |
+
import types
|
| 13 |
+
import weakref
|
| 14 |
+
import os
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
_threads_queues = weakref.WeakKeyDictionary()
|
| 18 |
+
_shutdown = False
|
| 19 |
+
# Lock that ensures that new workers are not created while the interpreter is
|
| 20 |
+
# shutting down. Must be held while mutating _threads_queues and _shutdown.
|
| 21 |
+
_global_shutdown_lock = threading.Lock()
|
| 22 |
+
|
| 23 |
+
def _python_exit():
|
| 24 |
+
global _shutdown
|
| 25 |
+
with _global_shutdown_lock:
|
| 26 |
+
_shutdown = True
|
| 27 |
+
items = list(_threads_queues.items())
|
| 28 |
+
for t, q in items:
|
| 29 |
+
q.put(None)
|
| 30 |
+
for t, q in items:
|
| 31 |
+
t.join()
|
| 32 |
+
|
| 33 |
+
# Register for `_python_exit()` to be called just before joining all
|
| 34 |
+
# non-daemon threads. This is used instead of `atexit.register()` for
|
| 35 |
+
# compatibility with subinterpreters, which no longer support daemon threads.
|
| 36 |
+
# See bpo-39812 for context.
|
| 37 |
+
threading._register_atexit(_python_exit)
|
| 38 |
+
|
| 39 |
+
# At fork, reinitialize the `_global_shutdown_lock` lock in the child process
|
| 40 |
+
if hasattr(os, 'register_at_fork'):
|
| 41 |
+
os.register_at_fork(before=_global_shutdown_lock.acquire,
|
| 42 |
+
after_in_child=_global_shutdown_lock._at_fork_reinit,
|
| 43 |
+
after_in_parent=_global_shutdown_lock.release)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
class _WorkItem(object):
|
| 47 |
+
def __init__(self, future, fn, args, kwargs):
|
| 48 |
+
self.future = future
|
| 49 |
+
self.fn = fn
|
| 50 |
+
self.args = args
|
| 51 |
+
self.kwargs = kwargs
|
| 52 |
+
|
| 53 |
+
def run(self):
|
| 54 |
+
if not self.future.set_running_or_notify_cancel():
|
| 55 |
+
return
|
| 56 |
+
|
| 57 |
+
try:
|
| 58 |
+
result = self.fn(*self.args, **self.kwargs)
|
| 59 |
+
except BaseException as exc:
|
| 60 |
+
self.future.set_exception(exc)
|
| 61 |
+
# Break a reference cycle with the exception 'exc'
|
| 62 |
+
self = None
|
| 63 |
+
else:
|
| 64 |
+
self.future.set_result(result)
|
| 65 |
+
|
| 66 |
+
__class_getitem__ = classmethod(types.GenericAlias)
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def _worker(executor_reference, work_queue, initializer, initargs):
|
| 70 |
+
if initializer is not None:
|
| 71 |
+
try:
|
| 72 |
+
initializer(*initargs)
|
| 73 |
+
except BaseException:
|
| 74 |
+
_base.LOGGER.critical('Exception in initializer:', exc_info=True)
|
| 75 |
+
executor = executor_reference()
|
| 76 |
+
if executor is not None:
|
| 77 |
+
executor._initializer_failed()
|
| 78 |
+
return
|
| 79 |
+
try:
|
| 80 |
+
while True:
|
| 81 |
+
work_item = work_queue.get(block=True)
|
| 82 |
+
if work_item is not None:
|
| 83 |
+
work_item.run()
|
| 84 |
+
# Delete references to object. See issue16284
|
| 85 |
+
del work_item
|
| 86 |
+
|
| 87 |
+
# attempt to increment idle count
|
| 88 |
+
executor = executor_reference()
|
| 89 |
+
if executor is not None:
|
| 90 |
+
executor._idle_semaphore.release()
|
| 91 |
+
del executor
|
| 92 |
+
continue
|
| 93 |
+
|
| 94 |
+
executor = executor_reference()
|
| 95 |
+
# Exit if:
|
| 96 |
+
# - The interpreter is shutting down OR
|
| 97 |
+
# - The executor that owns the worker has been collected OR
|
| 98 |
+
# - The executor that owns the worker has been shutdown.
|
| 99 |
+
if _shutdown or executor is None or executor._shutdown:
|
| 100 |
+
# Flag the executor as shutting down as early as possible if it
|
| 101 |
+
# is not gc-ed yet.
|
| 102 |
+
if executor is not None:
|
| 103 |
+
executor._shutdown = True
|
| 104 |
+
# Notice other workers
|
| 105 |
+
work_queue.put(None)
|
| 106 |
+
return
|
| 107 |
+
del executor
|
| 108 |
+
except BaseException:
|
| 109 |
+
_base.LOGGER.critical('Exception in worker', exc_info=True)
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
class BrokenThreadPool(_base.BrokenExecutor):
|
| 113 |
+
"""
|
| 114 |
+
Raised when a worker thread in a ThreadPoolExecutor failed initializing.
|
| 115 |
+
"""
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
class ThreadPoolExecutor(_base.Executor):
|
| 119 |
+
|
| 120 |
+
# Used to assign unique thread names when thread_name_prefix is not supplied.
|
| 121 |
+
_counter = itertools.count().__next__
|
| 122 |
+
|
| 123 |
+
def __init__(self, max_workers=None, thread_name_prefix='',
|
| 124 |
+
initializer=None, initargs=()):
|
| 125 |
+
"""Initializes a new ThreadPoolExecutor instance.
|
| 126 |
+
|
| 127 |
+
Args:
|
| 128 |
+
max_workers: The maximum number of threads that can be used to
|
| 129 |
+
execute the given calls.
|
| 130 |
+
thread_name_prefix: An optional name prefix to give our threads.
|
| 131 |
+
initializer: A callable used to initialize worker threads.
|
| 132 |
+
initargs: A tuple of arguments to pass to the initializer.
|
| 133 |
+
"""
|
| 134 |
+
if max_workers is None:
|
| 135 |
+
# ThreadPoolExecutor is often used to:
|
| 136 |
+
# * CPU bound task which releases GIL
|
| 137 |
+
# * I/O bound task (which releases GIL, of course)
|
| 138 |
+
#
|
| 139 |
+
# We use cpu_count + 4 for both types of tasks.
|
| 140 |
+
# But we limit it to 32 to avoid consuming surprisingly large resource
|
| 141 |
+
# on many core machine.
|
| 142 |
+
max_workers = min(32, (os.cpu_count() or 1) + 4)
|
| 143 |
+
if max_workers <= 0:
|
| 144 |
+
raise ValueError("max_workers must be greater than 0")
|
| 145 |
+
|
| 146 |
+
if initializer is not None and not callable(initializer):
|
| 147 |
+
raise TypeError("initializer must be a callable")
|
| 148 |
+
|
| 149 |
+
self._max_workers = max_workers
|
| 150 |
+
self._work_queue = queue.SimpleQueue()
|
| 151 |
+
self._idle_semaphore = threading.Semaphore(0)
|
| 152 |
+
self._threads = set()
|
| 153 |
+
self._broken = False
|
| 154 |
+
self._shutdown = False
|
| 155 |
+
self._shutdown_lock = threading.Lock()
|
| 156 |
+
self._thread_name_prefix = (thread_name_prefix or
|
| 157 |
+
("ThreadPoolExecutor-%d" % self._counter()))
|
| 158 |
+
self._initializer = initializer
|
| 159 |
+
self._initargs = initargs
|
| 160 |
+
|
| 161 |
+
def submit(self, fn, /, *args, **kwargs):
|
| 162 |
+
with self._shutdown_lock, _global_shutdown_lock:
|
| 163 |
+
if self._broken:
|
| 164 |
+
raise BrokenThreadPool(self._broken)
|
| 165 |
+
|
| 166 |
+
if self._shutdown:
|
| 167 |
+
raise RuntimeError('cannot schedule new futures after shutdown')
|
| 168 |
+
if _shutdown:
|
| 169 |
+
raise RuntimeError('cannot schedule new futures after '
|
| 170 |
+
'interpreter shutdown')
|
| 171 |
+
|
| 172 |
+
f = _base.Future()
|
| 173 |
+
w = _WorkItem(f, fn, args, kwargs)
|
| 174 |
+
|
| 175 |
+
self._work_queue.put(w)
|
| 176 |
+
self._adjust_thread_count()
|
| 177 |
+
return f
|
| 178 |
+
submit.__doc__ = _base.Executor.submit.__doc__
|
| 179 |
+
|
| 180 |
+
def _adjust_thread_count(self):
|
| 181 |
+
# if idle threads are available, don't spin new threads
|
| 182 |
+
if self._idle_semaphore.acquire(timeout=0):
|
| 183 |
+
return
|
| 184 |
+
|
| 185 |
+
# When the executor gets lost, the weakref callback will wake up
|
| 186 |
+
# the worker threads.
|
| 187 |
+
def weakref_cb(_, q=self._work_queue):
|
| 188 |
+
q.put(None)
|
| 189 |
+
|
| 190 |
+
num_threads = len(self._threads)
|
| 191 |
+
if num_threads < self._max_workers:
|
| 192 |
+
thread_name = '%s_%d' % (self._thread_name_prefix or self,
|
| 193 |
+
num_threads)
|
| 194 |
+
t = threading.Thread(name=thread_name, target=_worker,
|
| 195 |
+
args=(weakref.ref(self, weakref_cb),
|
| 196 |
+
self._work_queue,
|
| 197 |
+
self._initializer,
|
| 198 |
+
self._initargs))
|
| 199 |
+
t.start()
|
| 200 |
+
self._threads.add(t)
|
| 201 |
+
_threads_queues[t] = self._work_queue
|
| 202 |
+
|
| 203 |
+
def _initializer_failed(self):
|
| 204 |
+
with self._shutdown_lock:
|
| 205 |
+
self._broken = ('A thread initializer failed, the thread pool '
|
| 206 |
+
'is not usable anymore')
|
| 207 |
+
# Drain work queue and mark pending futures failed
|
| 208 |
+
while True:
|
| 209 |
+
try:
|
| 210 |
+
work_item = self._work_queue.get_nowait()
|
| 211 |
+
except queue.Empty:
|
| 212 |
+
break
|
| 213 |
+
if work_item is not None:
|
| 214 |
+
work_item.future.set_exception(BrokenThreadPool(self._broken))
|
| 215 |
+
|
| 216 |
+
def shutdown(self, wait=True, *, cancel_futures=False):
|
| 217 |
+
with self._shutdown_lock:
|
| 218 |
+
self._shutdown = True
|
| 219 |
+
if cancel_futures:
|
| 220 |
+
# Drain all work items from the queue, and then cancel their
|
| 221 |
+
# associated futures.
|
| 222 |
+
while True:
|
| 223 |
+
try:
|
| 224 |
+
work_item = self._work_queue.get_nowait()
|
| 225 |
+
except queue.Empty:
|
| 226 |
+
break
|
| 227 |
+
if work_item is not None:
|
| 228 |
+
work_item.future.cancel()
|
| 229 |
+
|
| 230 |
+
# Send a wake-up to prevent threads calling
|
| 231 |
+
# _work_queue.get(block=True) from permanently blocking.
|
| 232 |
+
self._work_queue.put(None)
|
| 233 |
+
if wait:
|
| 234 |
+
for t in self._threads:
|
| 235 |
+
t.join()
|
| 236 |
+
shutdown.__doc__ = _base.Executor.shutdown.__doc__
|
pllava/lib/python3.10/encodings/ascii.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python 'ascii' Codec
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
Written by Marc-Andre Lemburg (mal@lemburg.com).
|
| 5 |
+
|
| 6 |
+
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
|
| 7 |
+
|
| 8 |
+
"""
|
| 9 |
+
import codecs
|
| 10 |
+
|
| 11 |
+
### Codec APIs
|
| 12 |
+
|
| 13 |
+
class Codec(codecs.Codec):
|
| 14 |
+
|
| 15 |
+
# Note: Binding these as C functions will result in the class not
|
| 16 |
+
# converting them to methods. This is intended.
|
| 17 |
+
encode = codecs.ascii_encode
|
| 18 |
+
decode = codecs.ascii_decode
|
| 19 |
+
|
| 20 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 21 |
+
def encode(self, input, final=False):
|
| 22 |
+
return codecs.ascii_encode(input, self.errors)[0]
|
| 23 |
+
|
| 24 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 25 |
+
def decode(self, input, final=False):
|
| 26 |
+
return codecs.ascii_decode(input, self.errors)[0]
|
| 27 |
+
|
| 28 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 32 |
+
pass
|
| 33 |
+
|
| 34 |
+
class StreamConverter(StreamWriter,StreamReader):
|
| 35 |
+
|
| 36 |
+
encode = codecs.ascii_decode
|
| 37 |
+
decode = codecs.ascii_encode
|
| 38 |
+
|
| 39 |
+
### encodings module API
|
| 40 |
+
|
| 41 |
+
def getregentry():
|
| 42 |
+
return codecs.CodecInfo(
|
| 43 |
+
name='ascii',
|
| 44 |
+
encode=Codec.encode,
|
| 45 |
+
decode=Codec.decode,
|
| 46 |
+
incrementalencoder=IncrementalEncoder,
|
| 47 |
+
incrementaldecoder=IncrementalDecoder,
|
| 48 |
+
streamwriter=StreamWriter,
|
| 49 |
+
streamreader=StreamReader,
|
| 50 |
+
)
|
pllava/lib/python3.10/encodings/cp037.py
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python Character Mapping Codec cp037 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP037.TXT' with gencodec.py.
|
| 2 |
+
|
| 3 |
+
"""#"
|
| 4 |
+
|
| 5 |
+
import codecs
|
| 6 |
+
|
| 7 |
+
### Codec APIs
|
| 8 |
+
|
| 9 |
+
class Codec(codecs.Codec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='cp037',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> NULL
|
| 49 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 50 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 51 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 52 |
+
'\x9c' # 0x04 -> CONTROL
|
| 53 |
+
'\t' # 0x05 -> HORIZONTAL TABULATION
|
| 54 |
+
'\x86' # 0x06 -> CONTROL
|
| 55 |
+
'\x7f' # 0x07 -> DELETE
|
| 56 |
+
'\x97' # 0x08 -> CONTROL
|
| 57 |
+
'\x8d' # 0x09 -> CONTROL
|
| 58 |
+
'\x8e' # 0x0A -> CONTROL
|
| 59 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 60 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 61 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 62 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 63 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 64 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 65 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 66 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 67 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 68 |
+
'\x9d' # 0x14 -> CONTROL
|
| 69 |
+
'\x85' # 0x15 -> CONTROL
|
| 70 |
+
'\x08' # 0x16 -> BACKSPACE
|
| 71 |
+
'\x87' # 0x17 -> CONTROL
|
| 72 |
+
'\x18' # 0x18 -> CANCEL
|
| 73 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 74 |
+
'\x92' # 0x1A -> CONTROL
|
| 75 |
+
'\x8f' # 0x1B -> CONTROL
|
| 76 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 77 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 78 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 79 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 80 |
+
'\x80' # 0x20 -> CONTROL
|
| 81 |
+
'\x81' # 0x21 -> CONTROL
|
| 82 |
+
'\x82' # 0x22 -> CONTROL
|
| 83 |
+
'\x83' # 0x23 -> CONTROL
|
| 84 |
+
'\x84' # 0x24 -> CONTROL
|
| 85 |
+
'\n' # 0x25 -> LINE FEED
|
| 86 |
+
'\x17' # 0x26 -> END OF TRANSMISSION BLOCK
|
| 87 |
+
'\x1b' # 0x27 -> ESCAPE
|
| 88 |
+
'\x88' # 0x28 -> CONTROL
|
| 89 |
+
'\x89' # 0x29 -> CONTROL
|
| 90 |
+
'\x8a' # 0x2A -> CONTROL
|
| 91 |
+
'\x8b' # 0x2B -> CONTROL
|
| 92 |
+
'\x8c' # 0x2C -> CONTROL
|
| 93 |
+
'\x05' # 0x2D -> ENQUIRY
|
| 94 |
+
'\x06' # 0x2E -> ACKNOWLEDGE
|
| 95 |
+
'\x07' # 0x2F -> BELL
|
| 96 |
+
'\x90' # 0x30 -> CONTROL
|
| 97 |
+
'\x91' # 0x31 -> CONTROL
|
| 98 |
+
'\x16' # 0x32 -> SYNCHRONOUS IDLE
|
| 99 |
+
'\x93' # 0x33 -> CONTROL
|
| 100 |
+
'\x94' # 0x34 -> CONTROL
|
| 101 |
+
'\x95' # 0x35 -> CONTROL
|
| 102 |
+
'\x96' # 0x36 -> CONTROL
|
| 103 |
+
'\x04' # 0x37 -> END OF TRANSMISSION
|
| 104 |
+
'\x98' # 0x38 -> CONTROL
|
| 105 |
+
'\x99' # 0x39 -> CONTROL
|
| 106 |
+
'\x9a' # 0x3A -> CONTROL
|
| 107 |
+
'\x9b' # 0x3B -> CONTROL
|
| 108 |
+
'\x14' # 0x3C -> DEVICE CONTROL FOUR
|
| 109 |
+
'\x15' # 0x3D -> NEGATIVE ACKNOWLEDGE
|
| 110 |
+
'\x9e' # 0x3E -> CONTROL
|
| 111 |
+
'\x1a' # 0x3F -> SUBSTITUTE
|
| 112 |
+
' ' # 0x40 -> SPACE
|
| 113 |
+
'\xa0' # 0x41 -> NO-BREAK SPACE
|
| 114 |
+
'\xe2' # 0x42 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
|
| 115 |
+
'\xe4' # 0x43 -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 116 |
+
'\xe0' # 0x44 -> LATIN SMALL LETTER A WITH GRAVE
|
| 117 |
+
'\xe1' # 0x45 -> LATIN SMALL LETTER A WITH ACUTE
|
| 118 |
+
'\xe3' # 0x46 -> LATIN SMALL LETTER A WITH TILDE
|
| 119 |
+
'\xe5' # 0x47 -> LATIN SMALL LETTER A WITH RING ABOVE
|
| 120 |
+
'\xe7' # 0x48 -> LATIN SMALL LETTER C WITH CEDILLA
|
| 121 |
+
'\xf1' # 0x49 -> LATIN SMALL LETTER N WITH TILDE
|
| 122 |
+
'\xa2' # 0x4A -> CENT SIGN
|
| 123 |
+
'.' # 0x4B -> FULL STOP
|
| 124 |
+
'<' # 0x4C -> LESS-THAN SIGN
|
| 125 |
+
'(' # 0x4D -> LEFT PARENTHESIS
|
| 126 |
+
'+' # 0x4E -> PLUS SIGN
|
| 127 |
+
'|' # 0x4F -> VERTICAL LINE
|
| 128 |
+
'&' # 0x50 -> AMPERSAND
|
| 129 |
+
'\xe9' # 0x51 -> LATIN SMALL LETTER E WITH ACUTE
|
| 130 |
+
'\xea' # 0x52 -> LATIN SMALL LETTER E WITH CIRCUMFLEX
|
| 131 |
+
'\xeb' # 0x53 -> LATIN SMALL LETTER E WITH DIAERESIS
|
| 132 |
+
'\xe8' # 0x54 -> LATIN SMALL LETTER E WITH GRAVE
|
| 133 |
+
'\xed' # 0x55 -> LATIN SMALL LETTER I WITH ACUTE
|
| 134 |
+
'\xee' # 0x56 -> LATIN SMALL LETTER I WITH CIRCUMFLEX
|
| 135 |
+
'\xef' # 0x57 -> LATIN SMALL LETTER I WITH DIAERESIS
|
| 136 |
+
'\xec' # 0x58 -> LATIN SMALL LETTER I WITH GRAVE
|
| 137 |
+
'\xdf' # 0x59 -> LATIN SMALL LETTER SHARP S (GERMAN)
|
| 138 |
+
'!' # 0x5A -> EXCLAMATION MARK
|
| 139 |
+
'$' # 0x5B -> DOLLAR SIGN
|
| 140 |
+
'*' # 0x5C -> ASTERISK
|
| 141 |
+
')' # 0x5D -> RIGHT PARENTHESIS
|
| 142 |
+
';' # 0x5E -> SEMICOLON
|
| 143 |
+
'\xac' # 0x5F -> NOT SIGN
|
| 144 |
+
'-' # 0x60 -> HYPHEN-MINUS
|
| 145 |
+
'/' # 0x61 -> SOLIDUS
|
| 146 |
+
'\xc2' # 0x62 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
| 147 |
+
'\xc4' # 0x63 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 148 |
+
'\xc0' # 0x64 -> LATIN CAPITAL LETTER A WITH GRAVE
|
| 149 |
+
'\xc1' # 0x65 -> LATIN CAPITAL LETTER A WITH ACUTE
|
| 150 |
+
'\xc3' # 0x66 -> LATIN CAPITAL LETTER A WITH TILDE
|
| 151 |
+
'\xc5' # 0x67 -> LATIN CAPITAL LETTER A WITH RING ABOVE
|
| 152 |
+
'\xc7' # 0x68 -> LATIN CAPITAL LETTER C WITH CEDILLA
|
| 153 |
+
'\xd1' # 0x69 -> LATIN CAPITAL LETTER N WITH TILDE
|
| 154 |
+
'\xa6' # 0x6A -> BROKEN BAR
|
| 155 |
+
',' # 0x6B -> COMMA
|
| 156 |
+
'%' # 0x6C -> PERCENT SIGN
|
| 157 |
+
'_' # 0x6D -> LOW LINE
|
| 158 |
+
'>' # 0x6E -> GREATER-THAN SIGN
|
| 159 |
+
'?' # 0x6F -> QUESTION MARK
|
| 160 |
+
'\xf8' # 0x70 -> LATIN SMALL LETTER O WITH STROKE
|
| 161 |
+
'\xc9' # 0x71 -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 162 |
+
'\xca' # 0x72 -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
| 163 |
+
'\xcb' # 0x73 -> LATIN CAPITAL LETTER E WITH DIAERESIS
|
| 164 |
+
'\xc8' # 0x74 -> LATIN CAPITAL LETTER E WITH GRAVE
|
| 165 |
+
'\xcd' # 0x75 -> LATIN CAPITAL LETTER I WITH ACUTE
|
| 166 |
+
'\xce' # 0x76 -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
| 167 |
+
'\xcf' # 0x77 -> LATIN CAPITAL LETTER I WITH DIAERESIS
|
| 168 |
+
'\xcc' # 0x78 -> LATIN CAPITAL LETTER I WITH GRAVE
|
| 169 |
+
'`' # 0x79 -> GRAVE ACCENT
|
| 170 |
+
':' # 0x7A -> COLON
|
| 171 |
+
'#' # 0x7B -> NUMBER SIGN
|
| 172 |
+
'@' # 0x7C -> COMMERCIAL AT
|
| 173 |
+
"'" # 0x7D -> APOSTROPHE
|
| 174 |
+
'=' # 0x7E -> EQUALS SIGN
|
| 175 |
+
'"' # 0x7F -> QUOTATION MARK
|
| 176 |
+
'\xd8' # 0x80 -> LATIN CAPITAL LETTER O WITH STROKE
|
| 177 |
+
'a' # 0x81 -> LATIN SMALL LETTER A
|
| 178 |
+
'b' # 0x82 -> LATIN SMALL LETTER B
|
| 179 |
+
'c' # 0x83 -> LATIN SMALL LETTER C
|
| 180 |
+
'd' # 0x84 -> LATIN SMALL LETTER D
|
| 181 |
+
'e' # 0x85 -> LATIN SMALL LETTER E
|
| 182 |
+
'f' # 0x86 -> LATIN SMALL LETTER F
|
| 183 |
+
'g' # 0x87 -> LATIN SMALL LETTER G
|
| 184 |
+
'h' # 0x88 -> LATIN SMALL LETTER H
|
| 185 |
+
'i' # 0x89 -> LATIN SMALL LETTER I
|
| 186 |
+
'\xab' # 0x8A -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 187 |
+
'\xbb' # 0x8B -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 188 |
+
'\xf0' # 0x8C -> LATIN SMALL LETTER ETH (ICELANDIC)
|
| 189 |
+
'\xfd' # 0x8D -> LATIN SMALL LETTER Y WITH ACUTE
|
| 190 |
+
'\xfe' # 0x8E -> LATIN SMALL LETTER THORN (ICELANDIC)
|
| 191 |
+
'\xb1' # 0x8F -> PLUS-MINUS SIGN
|
| 192 |
+
'\xb0' # 0x90 -> DEGREE SIGN
|
| 193 |
+
'j' # 0x91 -> LATIN SMALL LETTER J
|
| 194 |
+
'k' # 0x92 -> LATIN SMALL LETTER K
|
| 195 |
+
'l' # 0x93 -> LATIN SMALL LETTER L
|
| 196 |
+
'm' # 0x94 -> LATIN SMALL LETTER M
|
| 197 |
+
'n' # 0x95 -> LATIN SMALL LETTER N
|
| 198 |
+
'o' # 0x96 -> LATIN SMALL LETTER O
|
| 199 |
+
'p' # 0x97 -> LATIN SMALL LETTER P
|
| 200 |
+
'q' # 0x98 -> LATIN SMALL LETTER Q
|
| 201 |
+
'r' # 0x99 -> LATIN SMALL LETTER R
|
| 202 |
+
'\xaa' # 0x9A -> FEMININE ORDINAL INDICATOR
|
| 203 |
+
'\xba' # 0x9B -> MASCULINE ORDINAL INDICATOR
|
| 204 |
+
'\xe6' # 0x9C -> LATIN SMALL LIGATURE AE
|
| 205 |
+
'\xb8' # 0x9D -> CEDILLA
|
| 206 |
+
'\xc6' # 0x9E -> LATIN CAPITAL LIGATURE AE
|
| 207 |
+
'\xa4' # 0x9F -> CURRENCY SIGN
|
| 208 |
+
'\xb5' # 0xA0 -> MICRO SIGN
|
| 209 |
+
'~' # 0xA1 -> TILDE
|
| 210 |
+
's' # 0xA2 -> LATIN SMALL LETTER S
|
| 211 |
+
't' # 0xA3 -> LATIN SMALL LETTER T
|
| 212 |
+
'u' # 0xA4 -> LATIN SMALL LETTER U
|
| 213 |
+
'v' # 0xA5 -> LATIN SMALL LETTER V
|
| 214 |
+
'w' # 0xA6 -> LATIN SMALL LETTER W
|
| 215 |
+
'x' # 0xA7 -> LATIN SMALL LETTER X
|
| 216 |
+
'y' # 0xA8 -> LATIN SMALL LETTER Y
|
| 217 |
+
'z' # 0xA9 -> LATIN SMALL LETTER Z
|
| 218 |
+
'\xa1' # 0xAA -> INVERTED EXCLAMATION MARK
|
| 219 |
+
'\xbf' # 0xAB -> INVERTED QUESTION MARK
|
| 220 |
+
'\xd0' # 0xAC -> LATIN CAPITAL LETTER ETH (ICELANDIC)
|
| 221 |
+
'\xdd' # 0xAD -> LATIN CAPITAL LETTER Y WITH ACUTE
|
| 222 |
+
'\xde' # 0xAE -> LATIN CAPITAL LETTER THORN (ICELANDIC)
|
| 223 |
+
'\xae' # 0xAF -> REGISTERED SIGN
|
| 224 |
+
'^' # 0xB0 -> CIRCUMFLEX ACCENT
|
| 225 |
+
'\xa3' # 0xB1 -> POUND SIGN
|
| 226 |
+
'\xa5' # 0xB2 -> YEN SIGN
|
| 227 |
+
'\xb7' # 0xB3 -> MIDDLE DOT
|
| 228 |
+
'\xa9' # 0xB4 -> COPYRIGHT SIGN
|
| 229 |
+
'\xa7' # 0xB5 -> SECTION SIGN
|
| 230 |
+
'\xb6' # 0xB6 -> PILCROW SIGN
|
| 231 |
+
'\xbc' # 0xB7 -> VULGAR FRACTION ONE QUARTER
|
| 232 |
+
'\xbd' # 0xB8 -> VULGAR FRACTION ONE HALF
|
| 233 |
+
'\xbe' # 0xB9 -> VULGAR FRACTION THREE QUARTERS
|
| 234 |
+
'[' # 0xBA -> LEFT SQUARE BRACKET
|
| 235 |
+
']' # 0xBB -> RIGHT SQUARE BRACKET
|
| 236 |
+
'\xaf' # 0xBC -> MACRON
|
| 237 |
+
'\xa8' # 0xBD -> DIAERESIS
|
| 238 |
+
'\xb4' # 0xBE -> ACUTE ACCENT
|
| 239 |
+
'\xd7' # 0xBF -> MULTIPLICATION SIGN
|
| 240 |
+
'{' # 0xC0 -> LEFT CURLY BRACKET
|
| 241 |
+
'A' # 0xC1 -> LATIN CAPITAL LETTER A
|
| 242 |
+
'B' # 0xC2 -> LATIN CAPITAL LETTER B
|
| 243 |
+
'C' # 0xC3 -> LATIN CAPITAL LETTER C
|
| 244 |
+
'D' # 0xC4 -> LATIN CAPITAL LETTER D
|
| 245 |
+
'E' # 0xC5 -> LATIN CAPITAL LETTER E
|
| 246 |
+
'F' # 0xC6 -> LATIN CAPITAL LETTER F
|
| 247 |
+
'G' # 0xC7 -> LATIN CAPITAL LETTER G
|
| 248 |
+
'H' # 0xC8 -> LATIN CAPITAL LETTER H
|
| 249 |
+
'I' # 0xC9 -> LATIN CAPITAL LETTER I
|
| 250 |
+
'\xad' # 0xCA -> SOFT HYPHEN
|
| 251 |
+
'\xf4' # 0xCB -> LATIN SMALL LETTER O WITH CIRCUMFLEX
|
| 252 |
+
'\xf6' # 0xCC -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 253 |
+
'\xf2' # 0xCD -> LATIN SMALL LETTER O WITH GRAVE
|
| 254 |
+
'\xf3' # 0xCE -> LATIN SMALL LETTER O WITH ACUTE
|
| 255 |
+
'\xf5' # 0xCF -> LATIN SMALL LETTER O WITH TILDE
|
| 256 |
+
'}' # 0xD0 -> RIGHT CURLY BRACKET
|
| 257 |
+
'J' # 0xD1 -> LATIN CAPITAL LETTER J
|
| 258 |
+
'K' # 0xD2 -> LATIN CAPITAL LETTER K
|
| 259 |
+
'L' # 0xD3 -> LATIN CAPITAL LETTER L
|
| 260 |
+
'M' # 0xD4 -> LATIN CAPITAL LETTER M
|
| 261 |
+
'N' # 0xD5 -> LATIN CAPITAL LETTER N
|
| 262 |
+
'O' # 0xD6 -> LATIN CAPITAL LETTER O
|
| 263 |
+
'P' # 0xD7 -> LATIN CAPITAL LETTER P
|
| 264 |
+
'Q' # 0xD8 -> LATIN CAPITAL LETTER Q
|
| 265 |
+
'R' # 0xD9 -> LATIN CAPITAL LETTER R
|
| 266 |
+
'\xb9' # 0xDA -> SUPERSCRIPT ONE
|
| 267 |
+
'\xfb' # 0xDB -> LATIN SMALL LETTER U WITH CIRCUMFLEX
|
| 268 |
+
'\xfc' # 0xDC -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 269 |
+
'\xf9' # 0xDD -> LATIN SMALL LETTER U WITH GRAVE
|
| 270 |
+
'\xfa' # 0xDE -> LATIN SMALL LETTER U WITH ACUTE
|
| 271 |
+
'\xff' # 0xDF -> LATIN SMALL LETTER Y WITH DIAERESIS
|
| 272 |
+
'\\' # 0xE0 -> REVERSE SOLIDUS
|
| 273 |
+
'\xf7' # 0xE1 -> DIVISION SIGN
|
| 274 |
+
'S' # 0xE2 -> LATIN CAPITAL LETTER S
|
| 275 |
+
'T' # 0xE3 -> LATIN CAPITAL LETTER T
|
| 276 |
+
'U' # 0xE4 -> LATIN CAPITAL LETTER U
|
| 277 |
+
'V' # 0xE5 -> LATIN CAPITAL LETTER V
|
| 278 |
+
'W' # 0xE6 -> LATIN CAPITAL LETTER W
|
| 279 |
+
'X' # 0xE7 -> LATIN CAPITAL LETTER X
|
| 280 |
+
'Y' # 0xE8 -> LATIN CAPITAL LETTER Y
|
| 281 |
+
'Z' # 0xE9 -> LATIN CAPITAL LETTER Z
|
| 282 |
+
'\xb2' # 0xEA -> SUPERSCRIPT TWO
|
| 283 |
+
'\xd4' # 0xEB -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
| 284 |
+
'\xd6' # 0xEC -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 285 |
+
'\xd2' # 0xED -> LATIN CAPITAL LETTER O WITH GRAVE
|
| 286 |
+
'\xd3' # 0xEE -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 287 |
+
'\xd5' # 0xEF -> LATIN CAPITAL LETTER O WITH TILDE
|
| 288 |
+
'0' # 0xF0 -> DIGIT ZERO
|
| 289 |
+
'1' # 0xF1 -> DIGIT ONE
|
| 290 |
+
'2' # 0xF2 -> DIGIT TWO
|
| 291 |
+
'3' # 0xF3 -> DIGIT THREE
|
| 292 |
+
'4' # 0xF4 -> DIGIT FOUR
|
| 293 |
+
'5' # 0xF5 -> DIGIT FIVE
|
| 294 |
+
'6' # 0xF6 -> DIGIT SIX
|
| 295 |
+
'7' # 0xF7 -> DIGIT SEVEN
|
| 296 |
+
'8' # 0xF8 -> DIGIT EIGHT
|
| 297 |
+
'9' # 0xF9 -> DIGIT NINE
|
| 298 |
+
'\xb3' # 0xFA -> SUPERSCRIPT THREE
|
| 299 |
+
'\xdb' # 0xFB -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
| 300 |
+
'\xdc' # 0xFC -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 301 |
+
'\xd9' # 0xFD -> LATIN CAPITAL LETTER U WITH GRAVE
|
| 302 |
+
'\xda' # 0xFE -> LATIN CAPITAL LETTER U WITH ACUTE
|
| 303 |
+
'\x9f' # 0xFF -> CONTROL
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/cp1006.py
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python Character Mapping Codec cp1006 generated from 'MAPPINGS/VENDORS/MISC/CP1006.TXT' with gencodec.py.
|
| 2 |
+
|
| 3 |
+
"""#"
|
| 4 |
+
|
| 5 |
+
import codecs
|
| 6 |
+
|
| 7 |
+
### Codec APIs
|
| 8 |
+
|
| 9 |
+
class Codec(codecs.Codec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='cp1006',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> NULL
|
| 49 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 50 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 51 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 52 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 53 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 54 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 55 |
+
'\x07' # 0x07 -> BELL
|
| 56 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 57 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 58 |
+
'\n' # 0x0A -> LINE FEED
|
| 59 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 60 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 61 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 62 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 63 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 64 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 65 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 66 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 67 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 68 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 69 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 70 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 71 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 72 |
+
'\x18' # 0x18 -> CANCEL
|
| 73 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 74 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 75 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 76 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 77 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 78 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 79 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> DELETE
|
| 176 |
+
'\x80' # 0x80 -> <control>
|
| 177 |
+
'\x81' # 0x81 -> <control>
|
| 178 |
+
'\x82' # 0x82 -> <control>
|
| 179 |
+
'\x83' # 0x83 -> <control>
|
| 180 |
+
'\x84' # 0x84 -> <control>
|
| 181 |
+
'\x85' # 0x85 -> <control>
|
| 182 |
+
'\x86' # 0x86 -> <control>
|
| 183 |
+
'\x87' # 0x87 -> <control>
|
| 184 |
+
'\x88' # 0x88 -> <control>
|
| 185 |
+
'\x89' # 0x89 -> <control>
|
| 186 |
+
'\x8a' # 0x8A -> <control>
|
| 187 |
+
'\x8b' # 0x8B -> <control>
|
| 188 |
+
'\x8c' # 0x8C -> <control>
|
| 189 |
+
'\x8d' # 0x8D -> <control>
|
| 190 |
+
'\x8e' # 0x8E -> <control>
|
| 191 |
+
'\x8f' # 0x8F -> <control>
|
| 192 |
+
'\x90' # 0x90 -> <control>
|
| 193 |
+
'\x91' # 0x91 -> <control>
|
| 194 |
+
'\x92' # 0x92 -> <control>
|
| 195 |
+
'\x93' # 0x93 -> <control>
|
| 196 |
+
'\x94' # 0x94 -> <control>
|
| 197 |
+
'\x95' # 0x95 -> <control>
|
| 198 |
+
'\x96' # 0x96 -> <control>
|
| 199 |
+
'\x97' # 0x97 -> <control>
|
| 200 |
+
'\x98' # 0x98 -> <control>
|
| 201 |
+
'\x99' # 0x99 -> <control>
|
| 202 |
+
'\x9a' # 0x9A -> <control>
|
| 203 |
+
'\x9b' # 0x9B -> <control>
|
| 204 |
+
'\x9c' # 0x9C -> <control>
|
| 205 |
+
'\x9d' # 0x9D -> <control>
|
| 206 |
+
'\x9e' # 0x9E -> <control>
|
| 207 |
+
'\x9f' # 0x9F -> <control>
|
| 208 |
+
'\xa0' # 0xA0 -> NO-BREAK SPACE
|
| 209 |
+
'\u06f0' # 0xA1 -> EXTENDED ARABIC-INDIC DIGIT ZERO
|
| 210 |
+
'\u06f1' # 0xA2 -> EXTENDED ARABIC-INDIC DIGIT ONE
|
| 211 |
+
'\u06f2' # 0xA3 -> EXTENDED ARABIC-INDIC DIGIT TWO
|
| 212 |
+
'\u06f3' # 0xA4 -> EXTENDED ARABIC-INDIC DIGIT THREE
|
| 213 |
+
'\u06f4' # 0xA5 -> EXTENDED ARABIC-INDIC DIGIT FOUR
|
| 214 |
+
'\u06f5' # 0xA6 -> EXTENDED ARABIC-INDIC DIGIT FIVE
|
| 215 |
+
'\u06f6' # 0xA7 -> EXTENDED ARABIC-INDIC DIGIT SIX
|
| 216 |
+
'\u06f7' # 0xA8 -> EXTENDED ARABIC-INDIC DIGIT SEVEN
|
| 217 |
+
'\u06f8' # 0xA9 -> EXTENDED ARABIC-INDIC DIGIT EIGHT
|
| 218 |
+
'\u06f9' # 0xAA -> EXTENDED ARABIC-INDIC DIGIT NINE
|
| 219 |
+
'\u060c' # 0xAB -> ARABIC COMMA
|
| 220 |
+
'\u061b' # 0xAC -> ARABIC SEMICOLON
|
| 221 |
+
'\xad' # 0xAD -> SOFT HYPHEN
|
| 222 |
+
'\u061f' # 0xAE -> ARABIC QUESTION MARK
|
| 223 |
+
'\ufe81' # 0xAF -> ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM
|
| 224 |
+
'\ufe8d' # 0xB0 -> ARABIC LETTER ALEF ISOLATED FORM
|
| 225 |
+
'\ufe8e' # 0xB1 -> ARABIC LETTER ALEF FINAL FORM
|
| 226 |
+
'\ufe8e' # 0xB2 -> ARABIC LETTER ALEF FINAL FORM
|
| 227 |
+
'\ufe8f' # 0xB3 -> ARABIC LETTER BEH ISOLATED FORM
|
| 228 |
+
'\ufe91' # 0xB4 -> ARABIC LETTER BEH INITIAL FORM
|
| 229 |
+
'\ufb56' # 0xB5 -> ARABIC LETTER PEH ISOLATED FORM
|
| 230 |
+
'\ufb58' # 0xB6 -> ARABIC LETTER PEH INITIAL FORM
|
| 231 |
+
'\ufe93' # 0xB7 -> ARABIC LETTER TEH MARBUTA ISOLATED FORM
|
| 232 |
+
'\ufe95' # 0xB8 -> ARABIC LETTER TEH ISOLATED FORM
|
| 233 |
+
'\ufe97' # 0xB9 -> ARABIC LETTER TEH INITIAL FORM
|
| 234 |
+
'\ufb66' # 0xBA -> ARABIC LETTER TTEH ISOLATED FORM
|
| 235 |
+
'\ufb68' # 0xBB -> ARABIC LETTER TTEH INITIAL FORM
|
| 236 |
+
'\ufe99' # 0xBC -> ARABIC LETTER THEH ISOLATED FORM
|
| 237 |
+
'\ufe9b' # 0xBD -> ARABIC LETTER THEH INITIAL FORM
|
| 238 |
+
'\ufe9d' # 0xBE -> ARABIC LETTER JEEM ISOLATED FORM
|
| 239 |
+
'\ufe9f' # 0xBF -> ARABIC LETTER JEEM INITIAL FORM
|
| 240 |
+
'\ufb7a' # 0xC0 -> ARABIC LETTER TCHEH ISOLATED FORM
|
| 241 |
+
'\ufb7c' # 0xC1 -> ARABIC LETTER TCHEH INITIAL FORM
|
| 242 |
+
'\ufea1' # 0xC2 -> ARABIC LETTER HAH ISOLATED FORM
|
| 243 |
+
'\ufea3' # 0xC3 -> ARABIC LETTER HAH INITIAL FORM
|
| 244 |
+
'\ufea5' # 0xC4 -> ARABIC LETTER KHAH ISOLATED FORM
|
| 245 |
+
'\ufea7' # 0xC5 -> ARABIC LETTER KHAH INITIAL FORM
|
| 246 |
+
'\ufea9' # 0xC6 -> ARABIC LETTER DAL ISOLATED FORM
|
| 247 |
+
'\ufb84' # 0xC7 -> ARABIC LETTER DAHAL ISOLATED FORMN
|
| 248 |
+
'\ufeab' # 0xC8 -> ARABIC LETTER THAL ISOLATED FORM
|
| 249 |
+
'\ufead' # 0xC9 -> ARABIC LETTER REH ISOLATED FORM
|
| 250 |
+
'\ufb8c' # 0xCA -> ARABIC LETTER RREH ISOLATED FORM
|
| 251 |
+
'\ufeaf' # 0xCB -> ARABIC LETTER ZAIN ISOLATED FORM
|
| 252 |
+
'\ufb8a' # 0xCC -> ARABIC LETTER JEH ISOLATED FORM
|
| 253 |
+
'\ufeb1' # 0xCD -> ARABIC LETTER SEEN ISOLATED FORM
|
| 254 |
+
'\ufeb3' # 0xCE -> ARABIC LETTER SEEN INITIAL FORM
|
| 255 |
+
'\ufeb5' # 0xCF -> ARABIC LETTER SHEEN ISOLATED FORM
|
| 256 |
+
'\ufeb7' # 0xD0 -> ARABIC LETTER SHEEN INITIAL FORM
|
| 257 |
+
'\ufeb9' # 0xD1 -> ARABIC LETTER SAD ISOLATED FORM
|
| 258 |
+
'\ufebb' # 0xD2 -> ARABIC LETTER SAD INITIAL FORM
|
| 259 |
+
'\ufebd' # 0xD3 -> ARABIC LETTER DAD ISOLATED FORM
|
| 260 |
+
'\ufebf' # 0xD4 -> ARABIC LETTER DAD INITIAL FORM
|
| 261 |
+
'\ufec1' # 0xD5 -> ARABIC LETTER TAH ISOLATED FORM
|
| 262 |
+
'\ufec5' # 0xD6 -> ARABIC LETTER ZAH ISOLATED FORM
|
| 263 |
+
'\ufec9' # 0xD7 -> ARABIC LETTER AIN ISOLATED FORM
|
| 264 |
+
'\ufeca' # 0xD8 -> ARABIC LETTER AIN FINAL FORM
|
| 265 |
+
'\ufecb' # 0xD9 -> ARABIC LETTER AIN INITIAL FORM
|
| 266 |
+
'\ufecc' # 0xDA -> ARABIC LETTER AIN MEDIAL FORM
|
| 267 |
+
'\ufecd' # 0xDB -> ARABIC LETTER GHAIN ISOLATED FORM
|
| 268 |
+
'\ufece' # 0xDC -> ARABIC LETTER GHAIN FINAL FORM
|
| 269 |
+
'\ufecf' # 0xDD -> ARABIC LETTER GHAIN INITIAL FORM
|
| 270 |
+
'\ufed0' # 0xDE -> ARABIC LETTER GHAIN MEDIAL FORM
|
| 271 |
+
'\ufed1' # 0xDF -> ARABIC LETTER FEH ISOLATED FORM
|
| 272 |
+
'\ufed3' # 0xE0 -> ARABIC LETTER FEH INITIAL FORM
|
| 273 |
+
'\ufed5' # 0xE1 -> ARABIC LETTER QAF ISOLATED FORM
|
| 274 |
+
'\ufed7' # 0xE2 -> ARABIC LETTER QAF INITIAL FORM
|
| 275 |
+
'\ufed9' # 0xE3 -> ARABIC LETTER KAF ISOLATED FORM
|
| 276 |
+
'\ufedb' # 0xE4 -> ARABIC LETTER KAF INITIAL FORM
|
| 277 |
+
'\ufb92' # 0xE5 -> ARABIC LETTER GAF ISOLATED FORM
|
| 278 |
+
'\ufb94' # 0xE6 -> ARABIC LETTER GAF INITIAL FORM
|
| 279 |
+
'\ufedd' # 0xE7 -> ARABIC LETTER LAM ISOLATED FORM
|
| 280 |
+
'\ufedf' # 0xE8 -> ARABIC LETTER LAM INITIAL FORM
|
| 281 |
+
'\ufee0' # 0xE9 -> ARABIC LETTER LAM MEDIAL FORM
|
| 282 |
+
'\ufee1' # 0xEA -> ARABIC LETTER MEEM ISOLATED FORM
|
| 283 |
+
'\ufee3' # 0xEB -> ARABIC LETTER MEEM INITIAL FORM
|
| 284 |
+
'\ufb9e' # 0xEC -> ARABIC LETTER NOON GHUNNA ISOLATED FORM
|
| 285 |
+
'\ufee5' # 0xED -> ARABIC LETTER NOON ISOLATED FORM
|
| 286 |
+
'\ufee7' # 0xEE -> ARABIC LETTER NOON INITIAL FORM
|
| 287 |
+
'\ufe85' # 0xEF -> ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM
|
| 288 |
+
'\ufeed' # 0xF0 -> ARABIC LETTER WAW ISOLATED FORM
|
| 289 |
+
'\ufba6' # 0xF1 -> ARABIC LETTER HEH GOAL ISOLATED FORM
|
| 290 |
+
'\ufba8' # 0xF2 -> ARABIC LETTER HEH GOAL INITIAL FORM
|
| 291 |
+
'\ufba9' # 0xF3 -> ARABIC LETTER HEH GOAL MEDIAL FORM
|
| 292 |
+
'\ufbaa' # 0xF4 -> ARABIC LETTER HEH DOACHASHMEE ISOLATED FORM
|
| 293 |
+
'\ufe80' # 0xF5 -> ARABIC LETTER HAMZA ISOLATED FORM
|
| 294 |
+
'\ufe89' # 0xF6 -> ARABIC LETTER YEH WITH HAMZA ABOVE ISOLATED FORM
|
| 295 |
+
'\ufe8a' # 0xF7 -> ARABIC LETTER YEH WITH HAMZA ABOVE FINAL FORM
|
| 296 |
+
'\ufe8b' # 0xF8 -> ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM
|
| 297 |
+
'\ufef1' # 0xF9 -> ARABIC LETTER YEH ISOLATED FORM
|
| 298 |
+
'\ufef2' # 0xFA -> ARABIC LETTER YEH FINAL FORM
|
| 299 |
+
'\ufef3' # 0xFB -> ARABIC LETTER YEH INITIAL FORM
|
| 300 |
+
'\ufbb0' # 0xFC -> ARABIC LETTER YEH BARREE WITH HAMZA ABOVE ISOLATED FORM
|
| 301 |
+
'\ufbae' # 0xFD -> ARABIC LETTER YEH BARREE ISOLATED FORM
|
| 302 |
+
'\ufe7c' # 0xFE -> ARABIC SHADDA ISOLATED FORM
|
| 303 |
+
'\ufe7d' # 0xFF -> ARABIC SHADDA MEDIAL FORM
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/cp1258.py
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python Character Mapping Codec cp1258 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.TXT' with gencodec.py.
|
| 2 |
+
|
| 3 |
+
"""#"
|
| 4 |
+
|
| 5 |
+
import codecs
|
| 6 |
+
|
| 7 |
+
### Codec APIs
|
| 8 |
+
|
| 9 |
+
class Codec(codecs.Codec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='cp1258',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> NULL
|
| 49 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 50 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 51 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 52 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 53 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 54 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 55 |
+
'\x07' # 0x07 -> BELL
|
| 56 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 57 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 58 |
+
'\n' # 0x0A -> LINE FEED
|
| 59 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 60 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 61 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 62 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 63 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 64 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 65 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 66 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 67 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 68 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 69 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 70 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 71 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 72 |
+
'\x18' # 0x18 -> CANCEL
|
| 73 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 74 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 75 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 76 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 77 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 78 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 79 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> DELETE
|
| 176 |
+
'\u20ac' # 0x80 -> EURO SIGN
|
| 177 |
+
'\ufffe' # 0x81 -> UNDEFINED
|
| 178 |
+
'\u201a' # 0x82 -> SINGLE LOW-9 QUOTATION MARK
|
| 179 |
+
'\u0192' # 0x83 -> LATIN SMALL LETTER F WITH HOOK
|
| 180 |
+
'\u201e' # 0x84 -> DOUBLE LOW-9 QUOTATION MARK
|
| 181 |
+
'\u2026' # 0x85 -> HORIZONTAL ELLIPSIS
|
| 182 |
+
'\u2020' # 0x86 -> DAGGER
|
| 183 |
+
'\u2021' # 0x87 -> DOUBLE DAGGER
|
| 184 |
+
'\u02c6' # 0x88 -> MODIFIER LETTER CIRCUMFLEX ACCENT
|
| 185 |
+
'\u2030' # 0x89 -> PER MILLE SIGN
|
| 186 |
+
'\ufffe' # 0x8A -> UNDEFINED
|
| 187 |
+
'\u2039' # 0x8B -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
| 188 |
+
'\u0152' # 0x8C -> LATIN CAPITAL LIGATURE OE
|
| 189 |
+
'\ufffe' # 0x8D -> UNDEFINED
|
| 190 |
+
'\ufffe' # 0x8E -> UNDEFINED
|
| 191 |
+
'\ufffe' # 0x8F -> UNDEFINED
|
| 192 |
+
'\ufffe' # 0x90 -> UNDEFINED
|
| 193 |
+
'\u2018' # 0x91 -> LEFT SINGLE QUOTATION MARK
|
| 194 |
+
'\u2019' # 0x92 -> RIGHT SINGLE QUOTATION MARK
|
| 195 |
+
'\u201c' # 0x93 -> LEFT DOUBLE QUOTATION MARK
|
| 196 |
+
'\u201d' # 0x94 -> RIGHT DOUBLE QUOTATION MARK
|
| 197 |
+
'\u2022' # 0x95 -> BULLET
|
| 198 |
+
'\u2013' # 0x96 -> EN DASH
|
| 199 |
+
'\u2014' # 0x97 -> EM DASH
|
| 200 |
+
'\u02dc' # 0x98 -> SMALL TILDE
|
| 201 |
+
'\u2122' # 0x99 -> TRADE MARK SIGN
|
| 202 |
+
'\ufffe' # 0x9A -> UNDEFINED
|
| 203 |
+
'\u203a' # 0x9B -> SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
| 204 |
+
'\u0153' # 0x9C -> LATIN SMALL LIGATURE OE
|
| 205 |
+
'\ufffe' # 0x9D -> UNDEFINED
|
| 206 |
+
'\ufffe' # 0x9E -> UNDEFINED
|
| 207 |
+
'\u0178' # 0x9F -> LATIN CAPITAL LETTER Y WITH DIAERESIS
|
| 208 |
+
'\xa0' # 0xA0 -> NO-BREAK SPACE
|
| 209 |
+
'\xa1' # 0xA1 -> INVERTED EXCLAMATION MARK
|
| 210 |
+
'\xa2' # 0xA2 -> CENT SIGN
|
| 211 |
+
'\xa3' # 0xA3 -> POUND SIGN
|
| 212 |
+
'\xa4' # 0xA4 -> CURRENCY SIGN
|
| 213 |
+
'\xa5' # 0xA5 -> YEN SIGN
|
| 214 |
+
'\xa6' # 0xA6 -> BROKEN BAR
|
| 215 |
+
'\xa7' # 0xA7 -> SECTION SIGN
|
| 216 |
+
'\xa8' # 0xA8 -> DIAERESIS
|
| 217 |
+
'\xa9' # 0xA9 -> COPYRIGHT SIGN
|
| 218 |
+
'\xaa' # 0xAA -> FEMININE ORDINAL INDICATOR
|
| 219 |
+
'\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 220 |
+
'\xac' # 0xAC -> NOT SIGN
|
| 221 |
+
'\xad' # 0xAD -> SOFT HYPHEN
|
| 222 |
+
'\xae' # 0xAE -> REGISTERED SIGN
|
| 223 |
+
'\xaf' # 0xAF -> MACRON
|
| 224 |
+
'\xb0' # 0xB0 -> DEGREE SIGN
|
| 225 |
+
'\xb1' # 0xB1 -> PLUS-MINUS SIGN
|
| 226 |
+
'\xb2' # 0xB2 -> SUPERSCRIPT TWO
|
| 227 |
+
'\xb3' # 0xB3 -> SUPERSCRIPT THREE
|
| 228 |
+
'\xb4' # 0xB4 -> ACUTE ACCENT
|
| 229 |
+
'\xb5' # 0xB5 -> MICRO SIGN
|
| 230 |
+
'\xb6' # 0xB6 -> PILCROW SIGN
|
| 231 |
+
'\xb7' # 0xB7 -> MIDDLE DOT
|
| 232 |
+
'\xb8' # 0xB8 -> CEDILLA
|
| 233 |
+
'\xb9' # 0xB9 -> SUPERSCRIPT ONE
|
| 234 |
+
'\xba' # 0xBA -> MASCULINE ORDINAL INDICATOR
|
| 235 |
+
'\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 236 |
+
'\xbc' # 0xBC -> VULGAR FRACTION ONE QUARTER
|
| 237 |
+
'\xbd' # 0xBD -> VULGAR FRACTION ONE HALF
|
| 238 |
+
'\xbe' # 0xBE -> VULGAR FRACTION THREE QUARTERS
|
| 239 |
+
'\xbf' # 0xBF -> INVERTED QUESTION MARK
|
| 240 |
+
'\xc0' # 0xC0 -> LATIN CAPITAL LETTER A WITH GRAVE
|
| 241 |
+
'\xc1' # 0xC1 -> LATIN CAPITAL LETTER A WITH ACUTE
|
| 242 |
+
'\xc2' # 0xC2 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
| 243 |
+
'\u0102' # 0xC3 -> LATIN CAPITAL LETTER A WITH BREVE
|
| 244 |
+
'\xc4' # 0xC4 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 245 |
+
'\xc5' # 0xC5 -> LATIN CAPITAL LETTER A WITH RING ABOVE
|
| 246 |
+
'\xc6' # 0xC6 -> LATIN CAPITAL LETTER AE
|
| 247 |
+
'\xc7' # 0xC7 -> LATIN CAPITAL LETTER C WITH CEDILLA
|
| 248 |
+
'\xc8' # 0xC8 -> LATIN CAPITAL LETTER E WITH GRAVE
|
| 249 |
+
'\xc9' # 0xC9 -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 250 |
+
'\xca' # 0xCA -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
| 251 |
+
'\xcb' # 0xCB -> LATIN CAPITAL LETTER E WITH DIAERESIS
|
| 252 |
+
'\u0300' # 0xCC -> COMBINING GRAVE ACCENT
|
| 253 |
+
'\xcd' # 0xCD -> LATIN CAPITAL LETTER I WITH ACUTE
|
| 254 |
+
'\xce' # 0xCE -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
| 255 |
+
'\xcf' # 0xCF -> LATIN CAPITAL LETTER I WITH DIAERESIS
|
| 256 |
+
'\u0110' # 0xD0 -> LATIN CAPITAL LETTER D WITH STROKE
|
| 257 |
+
'\xd1' # 0xD1 -> LATIN CAPITAL LETTER N WITH TILDE
|
| 258 |
+
'\u0309' # 0xD2 -> COMBINING HOOK ABOVE
|
| 259 |
+
'\xd3' # 0xD3 -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 260 |
+
'\xd4' # 0xD4 -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
| 261 |
+
'\u01a0' # 0xD5 -> LATIN CAPITAL LETTER O WITH HORN
|
| 262 |
+
'\xd6' # 0xD6 -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 263 |
+
'\xd7' # 0xD7 -> MULTIPLICATION SIGN
|
| 264 |
+
'\xd8' # 0xD8 -> LATIN CAPITAL LETTER O WITH STROKE
|
| 265 |
+
'\xd9' # 0xD9 -> LATIN CAPITAL LETTER U WITH GRAVE
|
| 266 |
+
'\xda' # 0xDA -> LATIN CAPITAL LETTER U WITH ACUTE
|
| 267 |
+
'\xdb' # 0xDB -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
| 268 |
+
'\xdc' # 0xDC -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 269 |
+
'\u01af' # 0xDD -> LATIN CAPITAL LETTER U WITH HORN
|
| 270 |
+
'\u0303' # 0xDE -> COMBINING TILDE
|
| 271 |
+
'\xdf' # 0xDF -> LATIN SMALL LETTER SHARP S
|
| 272 |
+
'\xe0' # 0xE0 -> LATIN SMALL LETTER A WITH GRAVE
|
| 273 |
+
'\xe1' # 0xE1 -> LATIN SMALL LETTER A WITH ACUTE
|
| 274 |
+
'\xe2' # 0xE2 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
|
| 275 |
+
'\u0103' # 0xE3 -> LATIN SMALL LETTER A WITH BREVE
|
| 276 |
+
'\xe4' # 0xE4 -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 277 |
+
'\xe5' # 0xE5 -> LATIN SMALL LETTER A WITH RING ABOVE
|
| 278 |
+
'\xe6' # 0xE6 -> LATIN SMALL LETTER AE
|
| 279 |
+
'\xe7' # 0xE7 -> LATIN SMALL LETTER C WITH CEDILLA
|
| 280 |
+
'\xe8' # 0xE8 -> LATIN SMALL LETTER E WITH GRAVE
|
| 281 |
+
'\xe9' # 0xE9 -> LATIN SMALL LETTER E WITH ACUTE
|
| 282 |
+
'\xea' # 0xEA -> LATIN SMALL LETTER E WITH CIRCUMFLEX
|
| 283 |
+
'\xeb' # 0xEB -> LATIN SMALL LETTER E WITH DIAERESIS
|
| 284 |
+
'\u0301' # 0xEC -> COMBINING ACUTE ACCENT
|
| 285 |
+
'\xed' # 0xED -> LATIN SMALL LETTER I WITH ACUTE
|
| 286 |
+
'\xee' # 0xEE -> LATIN SMALL LETTER I WITH CIRCUMFLEX
|
| 287 |
+
'\xef' # 0xEF -> LATIN SMALL LETTER I WITH DIAERESIS
|
| 288 |
+
'\u0111' # 0xF0 -> LATIN SMALL LETTER D WITH STROKE
|
| 289 |
+
'\xf1' # 0xF1 -> LATIN SMALL LETTER N WITH TILDE
|
| 290 |
+
'\u0323' # 0xF2 -> COMBINING DOT BELOW
|
| 291 |
+
'\xf3' # 0xF3 -> LATIN SMALL LETTER O WITH ACUTE
|
| 292 |
+
'\xf4' # 0xF4 -> LATIN SMALL LETTER O WITH CIRCUMFLEX
|
| 293 |
+
'\u01a1' # 0xF5 -> LATIN SMALL LETTER O WITH HORN
|
| 294 |
+
'\xf6' # 0xF6 -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 295 |
+
'\xf7' # 0xF7 -> DIVISION SIGN
|
| 296 |
+
'\xf8' # 0xF8 -> LATIN SMALL LETTER O WITH STROKE
|
| 297 |
+
'\xf9' # 0xF9 -> LATIN SMALL LETTER U WITH GRAVE
|
| 298 |
+
'\xfa' # 0xFA -> LATIN SMALL LETTER U WITH ACUTE
|
| 299 |
+
'\xfb' # 0xFB -> LATIN SMALL LETTER U WITH CIRCUMFLEX
|
| 300 |
+
'\xfc' # 0xFC -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 301 |
+
'\u01b0' # 0xFD -> LATIN SMALL LETTER U WITH HORN
|
| 302 |
+
'\u20ab' # 0xFE -> DONG SIGN
|
| 303 |
+
'\xff' # 0xFF -> LATIN SMALL LETTER Y WITH DIAERESIS
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/cp856.py
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python Character Mapping Codec cp856 generated from 'MAPPINGS/VENDORS/MISC/CP856.TXT' with gencodec.py.
|
| 2 |
+
|
| 3 |
+
"""#"
|
| 4 |
+
|
| 5 |
+
import codecs
|
| 6 |
+
|
| 7 |
+
### Codec APIs
|
| 8 |
+
|
| 9 |
+
class Codec(codecs.Codec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='cp856',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> NULL
|
| 49 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 50 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 51 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 52 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 53 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 54 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 55 |
+
'\x07' # 0x07 -> BELL
|
| 56 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 57 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 58 |
+
'\n' # 0x0A -> LINE FEED
|
| 59 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 60 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 61 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 62 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 63 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 64 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 65 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 66 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 67 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 68 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 69 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 70 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 71 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 72 |
+
'\x18' # 0x18 -> CANCEL
|
| 73 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 74 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 75 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 76 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 77 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 78 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 79 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> DELETE
|
| 176 |
+
'\u05d0' # 0x80 -> HEBREW LETTER ALEF
|
| 177 |
+
'\u05d1' # 0x81 -> HEBREW LETTER BET
|
| 178 |
+
'\u05d2' # 0x82 -> HEBREW LETTER GIMEL
|
| 179 |
+
'\u05d3' # 0x83 -> HEBREW LETTER DALET
|
| 180 |
+
'\u05d4' # 0x84 -> HEBREW LETTER HE
|
| 181 |
+
'\u05d5' # 0x85 -> HEBREW LETTER VAV
|
| 182 |
+
'\u05d6' # 0x86 -> HEBREW LETTER ZAYIN
|
| 183 |
+
'\u05d7' # 0x87 -> HEBREW LETTER HET
|
| 184 |
+
'\u05d8' # 0x88 -> HEBREW LETTER TET
|
| 185 |
+
'\u05d9' # 0x89 -> HEBREW LETTER YOD
|
| 186 |
+
'\u05da' # 0x8A -> HEBREW LETTER FINAL KAF
|
| 187 |
+
'\u05db' # 0x8B -> HEBREW LETTER KAF
|
| 188 |
+
'\u05dc' # 0x8C -> HEBREW LETTER LAMED
|
| 189 |
+
'\u05dd' # 0x8D -> HEBREW LETTER FINAL MEM
|
| 190 |
+
'\u05de' # 0x8E -> HEBREW LETTER MEM
|
| 191 |
+
'\u05df' # 0x8F -> HEBREW LETTER FINAL NUN
|
| 192 |
+
'\u05e0' # 0x90 -> HEBREW LETTER NUN
|
| 193 |
+
'\u05e1' # 0x91 -> HEBREW LETTER SAMEKH
|
| 194 |
+
'\u05e2' # 0x92 -> HEBREW LETTER AYIN
|
| 195 |
+
'\u05e3' # 0x93 -> HEBREW LETTER FINAL PE
|
| 196 |
+
'\u05e4' # 0x94 -> HEBREW LETTER PE
|
| 197 |
+
'\u05e5' # 0x95 -> HEBREW LETTER FINAL TSADI
|
| 198 |
+
'\u05e6' # 0x96 -> HEBREW LETTER TSADI
|
| 199 |
+
'\u05e7' # 0x97 -> HEBREW LETTER QOF
|
| 200 |
+
'\u05e8' # 0x98 -> HEBREW LETTER RESH
|
| 201 |
+
'\u05e9' # 0x99 -> HEBREW LETTER SHIN
|
| 202 |
+
'\u05ea' # 0x9A -> HEBREW LETTER TAV
|
| 203 |
+
'\ufffe' # 0x9B -> UNDEFINED
|
| 204 |
+
'\xa3' # 0x9C -> POUND SIGN
|
| 205 |
+
'\ufffe' # 0x9D -> UNDEFINED
|
| 206 |
+
'\xd7' # 0x9E -> MULTIPLICATION SIGN
|
| 207 |
+
'\ufffe' # 0x9F -> UNDEFINED
|
| 208 |
+
'\ufffe' # 0xA0 -> UNDEFINED
|
| 209 |
+
'\ufffe' # 0xA1 -> UNDEFINED
|
| 210 |
+
'\ufffe' # 0xA2 -> UNDEFINED
|
| 211 |
+
'\ufffe' # 0xA3 -> UNDEFINED
|
| 212 |
+
'\ufffe' # 0xA4 -> UNDEFINED
|
| 213 |
+
'\ufffe' # 0xA5 -> UNDEFINED
|
| 214 |
+
'\ufffe' # 0xA6 -> UNDEFINED
|
| 215 |
+
'\ufffe' # 0xA7 -> UNDEFINED
|
| 216 |
+
'\ufffe' # 0xA8 -> UNDEFINED
|
| 217 |
+
'\xae' # 0xA9 -> REGISTERED SIGN
|
| 218 |
+
'\xac' # 0xAA -> NOT SIGN
|
| 219 |
+
'\xbd' # 0xAB -> VULGAR FRACTION ONE HALF
|
| 220 |
+
'\xbc' # 0xAC -> VULGAR FRACTION ONE QUARTER
|
| 221 |
+
'\ufffe' # 0xAD -> UNDEFINED
|
| 222 |
+
'\xab' # 0xAE -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 223 |
+
'\xbb' # 0xAF -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 224 |
+
'\u2591' # 0xB0 -> LIGHT SHADE
|
| 225 |
+
'\u2592' # 0xB1 -> MEDIUM SHADE
|
| 226 |
+
'\u2593' # 0xB2 -> DARK SHADE
|
| 227 |
+
'\u2502' # 0xB3 -> BOX DRAWINGS LIGHT VERTICAL
|
| 228 |
+
'\u2524' # 0xB4 -> BOX DRAWINGS LIGHT VERTICAL AND LEFT
|
| 229 |
+
'\ufffe' # 0xB5 -> UNDEFINED
|
| 230 |
+
'\ufffe' # 0xB6 -> UNDEFINED
|
| 231 |
+
'\ufffe' # 0xB7 -> UNDEFINED
|
| 232 |
+
'\xa9' # 0xB8 -> COPYRIGHT SIGN
|
| 233 |
+
'\u2563' # 0xB9 -> BOX DRAWINGS DOUBLE VERTICAL AND LEFT
|
| 234 |
+
'\u2551' # 0xBA -> BOX DRAWINGS DOUBLE VERTICAL
|
| 235 |
+
'\u2557' # 0xBB -> BOX DRAWINGS DOUBLE DOWN AND LEFT
|
| 236 |
+
'\u255d' # 0xBC -> BOX DRAWINGS DOUBLE UP AND LEFT
|
| 237 |
+
'\xa2' # 0xBD -> CENT SIGN
|
| 238 |
+
'\xa5' # 0xBE -> YEN SIGN
|
| 239 |
+
'\u2510' # 0xBF -> BOX DRAWINGS LIGHT DOWN AND LEFT
|
| 240 |
+
'\u2514' # 0xC0 -> BOX DRAWINGS LIGHT UP AND RIGHT
|
| 241 |
+
'\u2534' # 0xC1 -> BOX DRAWINGS LIGHT UP AND HORIZONTAL
|
| 242 |
+
'\u252c' # 0xC2 -> BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
|
| 243 |
+
'\u251c' # 0xC3 -> BOX DRAWINGS LIGHT VERTICAL AND RIGHT
|
| 244 |
+
'\u2500' # 0xC4 -> BOX DRAWINGS LIGHT HORIZONTAL
|
| 245 |
+
'\u253c' # 0xC5 -> BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
|
| 246 |
+
'\ufffe' # 0xC6 -> UNDEFINED
|
| 247 |
+
'\ufffe' # 0xC7 -> UNDEFINED
|
| 248 |
+
'\u255a' # 0xC8 -> BOX DRAWINGS DOUBLE UP AND RIGHT
|
| 249 |
+
'\u2554' # 0xC9 -> BOX DRAWINGS DOUBLE DOWN AND RIGHT
|
| 250 |
+
'\u2569' # 0xCA -> BOX DRAWINGS DOUBLE UP AND HORIZONTAL
|
| 251 |
+
'\u2566' # 0xCB -> BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
|
| 252 |
+
'\u2560' # 0xCC -> BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
|
| 253 |
+
'\u2550' # 0xCD -> BOX DRAWINGS DOUBLE HORIZONTAL
|
| 254 |
+
'\u256c' # 0xCE -> BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
|
| 255 |
+
'\xa4' # 0xCF -> CURRENCY SIGN
|
| 256 |
+
'\ufffe' # 0xD0 -> UNDEFINED
|
| 257 |
+
'\ufffe' # 0xD1 -> UNDEFINED
|
| 258 |
+
'\ufffe' # 0xD2 -> UNDEFINED
|
| 259 |
+
'\ufffe' # 0xD3 -> UNDEFINEDS
|
| 260 |
+
'\ufffe' # 0xD4 -> UNDEFINED
|
| 261 |
+
'\ufffe' # 0xD5 -> UNDEFINED
|
| 262 |
+
'\ufffe' # 0xD6 -> UNDEFINEDE
|
| 263 |
+
'\ufffe' # 0xD7 -> UNDEFINED
|
| 264 |
+
'\ufffe' # 0xD8 -> UNDEFINED
|
| 265 |
+
'\u2518' # 0xD9 -> BOX DRAWINGS LIGHT UP AND LEFT
|
| 266 |
+
'\u250c' # 0xDA -> BOX DRAWINGS LIGHT DOWN AND RIGHT
|
| 267 |
+
'\u2588' # 0xDB -> FULL BLOCK
|
| 268 |
+
'\u2584' # 0xDC -> LOWER HALF BLOCK
|
| 269 |
+
'\xa6' # 0xDD -> BROKEN BAR
|
| 270 |
+
'\ufffe' # 0xDE -> UNDEFINED
|
| 271 |
+
'\u2580' # 0xDF -> UPPER HALF BLOCK
|
| 272 |
+
'\ufffe' # 0xE0 -> UNDEFINED
|
| 273 |
+
'\ufffe' # 0xE1 -> UNDEFINED
|
| 274 |
+
'\ufffe' # 0xE2 -> UNDEFINED
|
| 275 |
+
'\ufffe' # 0xE3 -> UNDEFINED
|
| 276 |
+
'\ufffe' # 0xE4 -> UNDEFINED
|
| 277 |
+
'\ufffe' # 0xE5 -> UNDEFINED
|
| 278 |
+
'\xb5' # 0xE6 -> MICRO SIGN
|
| 279 |
+
'\ufffe' # 0xE7 -> UNDEFINED
|
| 280 |
+
'\ufffe' # 0xE8 -> UNDEFINED
|
| 281 |
+
'\ufffe' # 0xE9 -> UNDEFINED
|
| 282 |
+
'\ufffe' # 0xEA -> UNDEFINED
|
| 283 |
+
'\ufffe' # 0xEB -> UNDEFINED
|
| 284 |
+
'\ufffe' # 0xEC -> UNDEFINED
|
| 285 |
+
'\ufffe' # 0xED -> UNDEFINED
|
| 286 |
+
'\xaf' # 0xEE -> MACRON
|
| 287 |
+
'\xb4' # 0xEF -> ACUTE ACCENT
|
| 288 |
+
'\xad' # 0xF0 -> SOFT HYPHEN
|
| 289 |
+
'\xb1' # 0xF1 -> PLUS-MINUS SIGN
|
| 290 |
+
'\u2017' # 0xF2 -> DOUBLE LOW LINE
|
| 291 |
+
'\xbe' # 0xF3 -> VULGAR FRACTION THREE QUARTERS
|
| 292 |
+
'\xb6' # 0xF4 -> PILCROW SIGN
|
| 293 |
+
'\xa7' # 0xF5 -> SECTION SIGN
|
| 294 |
+
'\xf7' # 0xF6 -> DIVISION SIGN
|
| 295 |
+
'\xb8' # 0xF7 -> CEDILLA
|
| 296 |
+
'\xb0' # 0xF8 -> DEGREE SIGN
|
| 297 |
+
'\xa8' # 0xF9 -> DIAERESIS
|
| 298 |
+
'\xb7' # 0xFA -> MIDDLE DOT
|
| 299 |
+
'\xb9' # 0xFB -> SUPERSCRIPT ONE
|
| 300 |
+
'\xb3' # 0xFC -> SUPERSCRIPT THREE
|
| 301 |
+
'\xb2' # 0xFD -> SUPERSCRIPT TWO
|
| 302 |
+
'\u25a0' # 0xFE -> BLACK SQUARE
|
| 303 |
+
'\xa0' # 0xFF -> NO-BREAK SPACE
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/cp864.py
ADDED
|
@@ -0,0 +1,690 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_map)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='cp864',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
### Decoding Map
|
| 45 |
+
|
| 46 |
+
decoding_map = codecs.make_identity_dict(range(256))
|
| 47 |
+
decoding_map.update({
|
| 48 |
+
0x0025: 0x066a, # ARABIC PERCENT SIGN
|
| 49 |
+
0x0080: 0x00b0, # DEGREE SIGN
|
| 50 |
+
0x0081: 0x00b7, # MIDDLE DOT
|
| 51 |
+
0x0082: 0x2219, # BULLET OPERATOR
|
| 52 |
+
0x0083: 0x221a, # SQUARE ROOT
|
| 53 |
+
0x0084: 0x2592, # MEDIUM SHADE
|
| 54 |
+
0x0085: 0x2500, # FORMS LIGHT HORIZONTAL
|
| 55 |
+
0x0086: 0x2502, # FORMS LIGHT VERTICAL
|
| 56 |
+
0x0087: 0x253c, # FORMS LIGHT VERTICAL AND HORIZONTAL
|
| 57 |
+
0x0088: 0x2524, # FORMS LIGHT VERTICAL AND LEFT
|
| 58 |
+
0x0089: 0x252c, # FORMS LIGHT DOWN AND HORIZONTAL
|
| 59 |
+
0x008a: 0x251c, # FORMS LIGHT VERTICAL AND RIGHT
|
| 60 |
+
0x008b: 0x2534, # FORMS LIGHT UP AND HORIZONTAL
|
| 61 |
+
0x008c: 0x2510, # FORMS LIGHT DOWN AND LEFT
|
| 62 |
+
0x008d: 0x250c, # FORMS LIGHT DOWN AND RIGHT
|
| 63 |
+
0x008e: 0x2514, # FORMS LIGHT UP AND RIGHT
|
| 64 |
+
0x008f: 0x2518, # FORMS LIGHT UP AND LEFT
|
| 65 |
+
0x0090: 0x03b2, # GREEK SMALL BETA
|
| 66 |
+
0x0091: 0x221e, # INFINITY
|
| 67 |
+
0x0092: 0x03c6, # GREEK SMALL PHI
|
| 68 |
+
0x0093: 0x00b1, # PLUS-OR-MINUS SIGN
|
| 69 |
+
0x0094: 0x00bd, # FRACTION 1/2
|
| 70 |
+
0x0095: 0x00bc, # FRACTION 1/4
|
| 71 |
+
0x0096: 0x2248, # ALMOST EQUAL TO
|
| 72 |
+
0x0097: 0x00ab, # LEFT POINTING GUILLEMET
|
| 73 |
+
0x0098: 0x00bb, # RIGHT POINTING GUILLEMET
|
| 74 |
+
0x0099: 0xfef7, # ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
|
| 75 |
+
0x009a: 0xfef8, # ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
|
| 76 |
+
0x009b: None, # UNDEFINED
|
| 77 |
+
0x009c: None, # UNDEFINED
|
| 78 |
+
0x009d: 0xfefb, # ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
|
| 79 |
+
0x009e: 0xfefc, # ARABIC LIGATURE LAM WITH ALEF FINAL FORM
|
| 80 |
+
0x009f: None, # UNDEFINED
|
| 81 |
+
0x00a1: 0x00ad, # SOFT HYPHEN
|
| 82 |
+
0x00a2: 0xfe82, # ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM
|
| 83 |
+
0x00a5: 0xfe84, # ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM
|
| 84 |
+
0x00a6: None, # UNDEFINED
|
| 85 |
+
0x00a7: None, # UNDEFINED
|
| 86 |
+
0x00a8: 0xfe8e, # ARABIC LETTER ALEF FINAL FORM
|
| 87 |
+
0x00a9: 0xfe8f, # ARABIC LETTER BEH ISOLATED FORM
|
| 88 |
+
0x00aa: 0xfe95, # ARABIC LETTER TEH ISOLATED FORM
|
| 89 |
+
0x00ab: 0xfe99, # ARABIC LETTER THEH ISOLATED FORM
|
| 90 |
+
0x00ac: 0x060c, # ARABIC COMMA
|
| 91 |
+
0x00ad: 0xfe9d, # ARABIC LETTER JEEM ISOLATED FORM
|
| 92 |
+
0x00ae: 0xfea1, # ARABIC LETTER HAH ISOLATED FORM
|
| 93 |
+
0x00af: 0xfea5, # ARABIC LETTER KHAH ISOLATED FORM
|
| 94 |
+
0x00b0: 0x0660, # ARABIC-INDIC DIGIT ZERO
|
| 95 |
+
0x00b1: 0x0661, # ARABIC-INDIC DIGIT ONE
|
| 96 |
+
0x00b2: 0x0662, # ARABIC-INDIC DIGIT TWO
|
| 97 |
+
0x00b3: 0x0663, # ARABIC-INDIC DIGIT THREE
|
| 98 |
+
0x00b4: 0x0664, # ARABIC-INDIC DIGIT FOUR
|
| 99 |
+
0x00b5: 0x0665, # ARABIC-INDIC DIGIT FIVE
|
| 100 |
+
0x00b6: 0x0666, # ARABIC-INDIC DIGIT SIX
|
| 101 |
+
0x00b7: 0x0667, # ARABIC-INDIC DIGIT SEVEN
|
| 102 |
+
0x00b8: 0x0668, # ARABIC-INDIC DIGIT EIGHT
|
| 103 |
+
0x00b9: 0x0669, # ARABIC-INDIC DIGIT NINE
|
| 104 |
+
0x00ba: 0xfed1, # ARABIC LETTER FEH ISOLATED FORM
|
| 105 |
+
0x00bb: 0x061b, # ARABIC SEMICOLON
|
| 106 |
+
0x00bc: 0xfeb1, # ARABIC LETTER SEEN ISOLATED FORM
|
| 107 |
+
0x00bd: 0xfeb5, # ARABIC LETTER SHEEN ISOLATED FORM
|
| 108 |
+
0x00be: 0xfeb9, # ARABIC LETTER SAD ISOLATED FORM
|
| 109 |
+
0x00bf: 0x061f, # ARABIC QUESTION MARK
|
| 110 |
+
0x00c0: 0x00a2, # CENT SIGN
|
| 111 |
+
0x00c1: 0xfe80, # ARABIC LETTER HAMZA ISOLATED FORM
|
| 112 |
+
0x00c2: 0xfe81, # ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM
|
| 113 |
+
0x00c3: 0xfe83, # ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM
|
| 114 |
+
0x00c4: 0xfe85, # ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM
|
| 115 |
+
0x00c5: 0xfeca, # ARABIC LETTER AIN FINAL FORM
|
| 116 |
+
0x00c6: 0xfe8b, # ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM
|
| 117 |
+
0x00c7: 0xfe8d, # ARABIC LETTER ALEF ISOLATED FORM
|
| 118 |
+
0x00c8: 0xfe91, # ARABIC LETTER BEH INITIAL FORM
|
| 119 |
+
0x00c9: 0xfe93, # ARABIC LETTER TEH MARBUTA ISOLATED FORM
|
| 120 |
+
0x00ca: 0xfe97, # ARABIC LETTER TEH INITIAL FORM
|
| 121 |
+
0x00cb: 0xfe9b, # ARABIC LETTER THEH INITIAL FORM
|
| 122 |
+
0x00cc: 0xfe9f, # ARABIC LETTER JEEM INITIAL FORM
|
| 123 |
+
0x00cd: 0xfea3, # ARABIC LETTER HAH INITIAL FORM
|
| 124 |
+
0x00ce: 0xfea7, # ARABIC LETTER KHAH INITIAL FORM
|
| 125 |
+
0x00cf: 0xfea9, # ARABIC LETTER DAL ISOLATED FORM
|
| 126 |
+
0x00d0: 0xfeab, # ARABIC LETTER THAL ISOLATED FORM
|
| 127 |
+
0x00d1: 0xfead, # ARABIC LETTER REH ISOLATED FORM
|
| 128 |
+
0x00d2: 0xfeaf, # ARABIC LETTER ZAIN ISOLATED FORM
|
| 129 |
+
0x00d3: 0xfeb3, # ARABIC LETTER SEEN INITIAL FORM
|
| 130 |
+
0x00d4: 0xfeb7, # ARABIC LETTER SHEEN INITIAL FORM
|
| 131 |
+
0x00d5: 0xfebb, # ARABIC LETTER SAD INITIAL FORM
|
| 132 |
+
0x00d6: 0xfebf, # ARABIC LETTER DAD INITIAL FORM
|
| 133 |
+
0x00d7: 0xfec1, # ARABIC LETTER TAH ISOLATED FORM
|
| 134 |
+
0x00d8: 0xfec5, # ARABIC LETTER ZAH ISOLATED FORM
|
| 135 |
+
0x00d9: 0xfecb, # ARABIC LETTER AIN INITIAL FORM
|
| 136 |
+
0x00da: 0xfecf, # ARABIC LETTER GHAIN INITIAL FORM
|
| 137 |
+
0x00db: 0x00a6, # BROKEN VERTICAL BAR
|
| 138 |
+
0x00dc: 0x00ac, # NOT SIGN
|
| 139 |
+
0x00dd: 0x00f7, # DIVISION SIGN
|
| 140 |
+
0x00de: 0x00d7, # MULTIPLICATION SIGN
|
| 141 |
+
0x00df: 0xfec9, # ARABIC LETTER AIN ISOLATED FORM
|
| 142 |
+
0x00e0: 0x0640, # ARABIC TATWEEL
|
| 143 |
+
0x00e1: 0xfed3, # ARABIC LETTER FEH INITIAL FORM
|
| 144 |
+
0x00e2: 0xfed7, # ARABIC LETTER QAF INITIAL FORM
|
| 145 |
+
0x00e3: 0xfedb, # ARABIC LETTER KAF INITIAL FORM
|
| 146 |
+
0x00e4: 0xfedf, # ARABIC LETTER LAM INITIAL FORM
|
| 147 |
+
0x00e5: 0xfee3, # ARABIC LETTER MEEM INITIAL FORM
|
| 148 |
+
0x00e6: 0xfee7, # ARABIC LETTER NOON INITIAL FORM
|
| 149 |
+
0x00e7: 0xfeeb, # ARABIC LETTER HEH INITIAL FORM
|
| 150 |
+
0x00e8: 0xfeed, # ARABIC LETTER WAW ISOLATED FORM
|
| 151 |
+
0x00e9: 0xfeef, # ARABIC LETTER ALEF MAKSURA ISOLATED FORM
|
| 152 |
+
0x00ea: 0xfef3, # ARABIC LETTER YEH INITIAL FORM
|
| 153 |
+
0x00eb: 0xfebd, # ARABIC LETTER DAD ISOLATED FORM
|
| 154 |
+
0x00ec: 0xfecc, # ARABIC LETTER AIN MEDIAL FORM
|
| 155 |
+
0x00ed: 0xfece, # ARABIC LETTER GHAIN FINAL FORM
|
| 156 |
+
0x00ee: 0xfecd, # ARABIC LETTER GHAIN ISOLATED FORM
|
| 157 |
+
0x00ef: 0xfee1, # ARABIC LETTER MEEM ISOLATED FORM
|
| 158 |
+
0x00f0: 0xfe7d, # ARABIC SHADDA MEDIAL FORM
|
| 159 |
+
0x00f1: 0x0651, # ARABIC SHADDAH
|
| 160 |
+
0x00f2: 0xfee5, # ARABIC LETTER NOON ISOLATED FORM
|
| 161 |
+
0x00f3: 0xfee9, # ARABIC LETTER HEH ISOLATED FORM
|
| 162 |
+
0x00f4: 0xfeec, # ARABIC LETTER HEH MEDIAL FORM
|
| 163 |
+
0x00f5: 0xfef0, # ARABIC LETTER ALEF MAKSURA FINAL FORM
|
| 164 |
+
0x00f6: 0xfef2, # ARABIC LETTER YEH FINAL FORM
|
| 165 |
+
0x00f7: 0xfed0, # ARABIC LETTER GHAIN MEDIAL FORM
|
| 166 |
+
0x00f8: 0xfed5, # ARABIC LETTER QAF ISOLATED FORM
|
| 167 |
+
0x00f9: 0xfef5, # ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
|
| 168 |
+
0x00fa: 0xfef6, # ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
|
| 169 |
+
0x00fb: 0xfedd, # ARABIC LETTER LAM ISOLATED FORM
|
| 170 |
+
0x00fc: 0xfed9, # ARABIC LETTER KAF ISOLATED FORM
|
| 171 |
+
0x00fd: 0xfef1, # ARABIC LETTER YEH ISOLATED FORM
|
| 172 |
+
0x00fe: 0x25a0, # BLACK SQUARE
|
| 173 |
+
0x00ff: None, # UNDEFINED
|
| 174 |
+
})
|
| 175 |
+
|
| 176 |
+
### Decoding Table
|
| 177 |
+
|
| 178 |
+
decoding_table = (
|
| 179 |
+
'\x00' # 0x0000 -> NULL
|
| 180 |
+
'\x01' # 0x0001 -> START OF HEADING
|
| 181 |
+
'\x02' # 0x0002 -> START OF TEXT
|
| 182 |
+
'\x03' # 0x0003 -> END OF TEXT
|
| 183 |
+
'\x04' # 0x0004 -> END OF TRANSMISSION
|
| 184 |
+
'\x05' # 0x0005 -> ENQUIRY
|
| 185 |
+
'\x06' # 0x0006 -> ACKNOWLEDGE
|
| 186 |
+
'\x07' # 0x0007 -> BELL
|
| 187 |
+
'\x08' # 0x0008 -> BACKSPACE
|
| 188 |
+
'\t' # 0x0009 -> HORIZONTAL TABULATION
|
| 189 |
+
'\n' # 0x000a -> LINE FEED
|
| 190 |
+
'\x0b' # 0x000b -> VERTICAL TABULATION
|
| 191 |
+
'\x0c' # 0x000c -> FORM FEED
|
| 192 |
+
'\r' # 0x000d -> CARRIAGE RETURN
|
| 193 |
+
'\x0e' # 0x000e -> SHIFT OUT
|
| 194 |
+
'\x0f' # 0x000f -> SHIFT IN
|
| 195 |
+
'\x10' # 0x0010 -> DATA LINK ESCAPE
|
| 196 |
+
'\x11' # 0x0011 -> DEVICE CONTROL ONE
|
| 197 |
+
'\x12' # 0x0012 -> DEVICE CONTROL TWO
|
| 198 |
+
'\x13' # 0x0013 -> DEVICE CONTROL THREE
|
| 199 |
+
'\x14' # 0x0014 -> DEVICE CONTROL FOUR
|
| 200 |
+
'\x15' # 0x0015 -> NEGATIVE ACKNOWLEDGE
|
| 201 |
+
'\x16' # 0x0016 -> SYNCHRONOUS IDLE
|
| 202 |
+
'\x17' # 0x0017 -> END OF TRANSMISSION BLOCK
|
| 203 |
+
'\x18' # 0x0018 -> CANCEL
|
| 204 |
+
'\x19' # 0x0019 -> END OF MEDIUM
|
| 205 |
+
'\x1a' # 0x001a -> SUBSTITUTE
|
| 206 |
+
'\x1b' # 0x001b -> ESCAPE
|
| 207 |
+
'\x1c' # 0x001c -> FILE SEPARATOR
|
| 208 |
+
'\x1d' # 0x001d -> GROUP SEPARATOR
|
| 209 |
+
'\x1e' # 0x001e -> RECORD SEPARATOR
|
| 210 |
+
'\x1f' # 0x001f -> UNIT SEPARATOR
|
| 211 |
+
' ' # 0x0020 -> SPACE
|
| 212 |
+
'!' # 0x0021 -> EXCLAMATION MARK
|
| 213 |
+
'"' # 0x0022 -> QUOTATION MARK
|
| 214 |
+
'#' # 0x0023 -> NUMBER SIGN
|
| 215 |
+
'$' # 0x0024 -> DOLLAR SIGN
|
| 216 |
+
'\u066a' # 0x0025 -> ARABIC PERCENT SIGN
|
| 217 |
+
'&' # 0x0026 -> AMPERSAND
|
| 218 |
+
"'" # 0x0027 -> APOSTROPHE
|
| 219 |
+
'(' # 0x0028 -> LEFT PARENTHESIS
|
| 220 |
+
')' # 0x0029 -> RIGHT PARENTHESIS
|
| 221 |
+
'*' # 0x002a -> ASTERISK
|
| 222 |
+
'+' # 0x002b -> PLUS SIGN
|
| 223 |
+
',' # 0x002c -> COMMA
|
| 224 |
+
'-' # 0x002d -> HYPHEN-MINUS
|
| 225 |
+
'.' # 0x002e -> FULL STOP
|
| 226 |
+
'/' # 0x002f -> SOLIDUS
|
| 227 |
+
'0' # 0x0030 -> DIGIT ZERO
|
| 228 |
+
'1' # 0x0031 -> DIGIT ONE
|
| 229 |
+
'2' # 0x0032 -> DIGIT TWO
|
| 230 |
+
'3' # 0x0033 -> DIGIT THREE
|
| 231 |
+
'4' # 0x0034 -> DIGIT FOUR
|
| 232 |
+
'5' # 0x0035 -> DIGIT FIVE
|
| 233 |
+
'6' # 0x0036 -> DIGIT SIX
|
| 234 |
+
'7' # 0x0037 -> DIGIT SEVEN
|
| 235 |
+
'8' # 0x0038 -> DIGIT EIGHT
|
| 236 |
+
'9' # 0x0039 -> DIGIT NINE
|
| 237 |
+
':' # 0x003a -> COLON
|
| 238 |
+
';' # 0x003b -> SEMICOLON
|
| 239 |
+
'<' # 0x003c -> LESS-THAN SIGN
|
| 240 |
+
'=' # 0x003d -> EQUALS SIGN
|
| 241 |
+
'>' # 0x003e -> GREATER-THAN SIGN
|
| 242 |
+
'?' # 0x003f -> QUESTION MARK
|
| 243 |
+
'@' # 0x0040 -> COMMERCIAL AT
|
| 244 |
+
'A' # 0x0041 -> LATIN CAPITAL LETTER A
|
| 245 |
+
'B' # 0x0042 -> LATIN CAPITAL LETTER B
|
| 246 |
+
'C' # 0x0043 -> LATIN CAPITAL LETTER C
|
| 247 |
+
'D' # 0x0044 -> LATIN CAPITAL LETTER D
|
| 248 |
+
'E' # 0x0045 -> LATIN CAPITAL LETTER E
|
| 249 |
+
'F' # 0x0046 -> LATIN CAPITAL LETTER F
|
| 250 |
+
'G' # 0x0047 -> LATIN CAPITAL LETTER G
|
| 251 |
+
'H' # 0x0048 -> LATIN CAPITAL LETTER H
|
| 252 |
+
'I' # 0x0049 -> LATIN CAPITAL LETTER I
|
| 253 |
+
'J' # 0x004a -> LATIN CAPITAL LETTER J
|
| 254 |
+
'K' # 0x004b -> LATIN CAPITAL LETTER K
|
| 255 |
+
'L' # 0x004c -> LATIN CAPITAL LETTER L
|
| 256 |
+
'M' # 0x004d -> LATIN CAPITAL LETTER M
|
| 257 |
+
'N' # 0x004e -> LATIN CAPITAL LETTER N
|
| 258 |
+
'O' # 0x004f -> LATIN CAPITAL LETTER O
|
| 259 |
+
'P' # 0x0050 -> LATIN CAPITAL LETTER P
|
| 260 |
+
'Q' # 0x0051 -> LATIN CAPITAL LETTER Q
|
| 261 |
+
'R' # 0x0052 -> LATIN CAPITAL LETTER R
|
| 262 |
+
'S' # 0x0053 -> LATIN CAPITAL LETTER S
|
| 263 |
+
'T' # 0x0054 -> LATIN CAPITAL LETTER T
|
| 264 |
+
'U' # 0x0055 -> LATIN CAPITAL LETTER U
|
| 265 |
+
'V' # 0x0056 -> LATIN CAPITAL LETTER V
|
| 266 |
+
'W' # 0x0057 -> LATIN CAPITAL LETTER W
|
| 267 |
+
'X' # 0x0058 -> LATIN CAPITAL LETTER X
|
| 268 |
+
'Y' # 0x0059 -> LATIN CAPITAL LETTER Y
|
| 269 |
+
'Z' # 0x005a -> LATIN CAPITAL LETTER Z
|
| 270 |
+
'[' # 0x005b -> LEFT SQUARE BRACKET
|
| 271 |
+
'\\' # 0x005c -> REVERSE SOLIDUS
|
| 272 |
+
']' # 0x005d -> RIGHT SQUARE BRACKET
|
| 273 |
+
'^' # 0x005e -> CIRCUMFLEX ACCENT
|
| 274 |
+
'_' # 0x005f -> LOW LINE
|
| 275 |
+
'`' # 0x0060 -> GRAVE ACCENT
|
| 276 |
+
'a' # 0x0061 -> LATIN SMALL LETTER A
|
| 277 |
+
'b' # 0x0062 -> LATIN SMALL LETTER B
|
| 278 |
+
'c' # 0x0063 -> LATIN SMALL LETTER C
|
| 279 |
+
'd' # 0x0064 -> LATIN SMALL LETTER D
|
| 280 |
+
'e' # 0x0065 -> LATIN SMALL LETTER E
|
| 281 |
+
'f' # 0x0066 -> LATIN SMALL LETTER F
|
| 282 |
+
'g' # 0x0067 -> LATIN SMALL LETTER G
|
| 283 |
+
'h' # 0x0068 -> LATIN SMALL LETTER H
|
| 284 |
+
'i' # 0x0069 -> LATIN SMALL LETTER I
|
| 285 |
+
'j' # 0x006a -> LATIN SMALL LETTER J
|
| 286 |
+
'k' # 0x006b -> LATIN SMALL LETTER K
|
| 287 |
+
'l' # 0x006c -> LATIN SMALL LETTER L
|
| 288 |
+
'm' # 0x006d -> LATIN SMALL LETTER M
|
| 289 |
+
'n' # 0x006e -> LATIN SMALL LETTER N
|
| 290 |
+
'o' # 0x006f -> LATIN SMALL LETTER O
|
| 291 |
+
'p' # 0x0070 -> LATIN SMALL LETTER P
|
| 292 |
+
'q' # 0x0071 -> LATIN SMALL LETTER Q
|
| 293 |
+
'r' # 0x0072 -> LATIN SMALL LETTER R
|
| 294 |
+
's' # 0x0073 -> LATIN SMALL LETTER S
|
| 295 |
+
't' # 0x0074 -> LATIN SMALL LETTER T
|
| 296 |
+
'u' # 0x0075 -> LATIN SMALL LETTER U
|
| 297 |
+
'v' # 0x0076 -> LATIN SMALL LETTER V
|
| 298 |
+
'w' # 0x0077 -> LATIN SMALL LETTER W
|
| 299 |
+
'x' # 0x0078 -> LATIN SMALL LETTER X
|
| 300 |
+
'y' # 0x0079 -> LATIN SMALL LETTER Y
|
| 301 |
+
'z' # 0x007a -> LATIN SMALL LETTER Z
|
| 302 |
+
'{' # 0x007b -> LEFT CURLY BRACKET
|
| 303 |
+
'|' # 0x007c -> VERTICAL LINE
|
| 304 |
+
'}' # 0x007d -> RIGHT CURLY BRACKET
|
| 305 |
+
'~' # 0x007e -> TILDE
|
| 306 |
+
'\x7f' # 0x007f -> DELETE
|
| 307 |
+
'\xb0' # 0x0080 -> DEGREE SIGN
|
| 308 |
+
'\xb7' # 0x0081 -> MIDDLE DOT
|
| 309 |
+
'\u2219' # 0x0082 -> BULLET OPERATOR
|
| 310 |
+
'\u221a' # 0x0083 -> SQUARE ROOT
|
| 311 |
+
'\u2592' # 0x0084 -> MEDIUM SHADE
|
| 312 |
+
'\u2500' # 0x0085 -> FORMS LIGHT HORIZONTAL
|
| 313 |
+
'\u2502' # 0x0086 -> FORMS LIGHT VERTICAL
|
| 314 |
+
'\u253c' # 0x0087 -> FORMS LIGHT VERTICAL AND HORIZONTAL
|
| 315 |
+
'\u2524' # 0x0088 -> FORMS LIGHT VERTICAL AND LEFT
|
| 316 |
+
'\u252c' # 0x0089 -> FORMS LIGHT DOWN AND HORIZONTAL
|
| 317 |
+
'\u251c' # 0x008a -> FORMS LIGHT VERTICAL AND RIGHT
|
| 318 |
+
'\u2534' # 0x008b -> FORMS LIGHT UP AND HORIZONTAL
|
| 319 |
+
'\u2510' # 0x008c -> FORMS LIGHT DOWN AND LEFT
|
| 320 |
+
'\u250c' # 0x008d -> FORMS LIGHT DOWN AND RIGHT
|
| 321 |
+
'\u2514' # 0x008e -> FORMS LIGHT UP AND RIGHT
|
| 322 |
+
'\u2518' # 0x008f -> FORMS LIGHT UP AND LEFT
|
| 323 |
+
'\u03b2' # 0x0090 -> GREEK SMALL BETA
|
| 324 |
+
'\u221e' # 0x0091 -> INFINITY
|
| 325 |
+
'\u03c6' # 0x0092 -> GREEK SMALL PHI
|
| 326 |
+
'\xb1' # 0x0093 -> PLUS-OR-MINUS SIGN
|
| 327 |
+
'\xbd' # 0x0094 -> FRACTION 1/2
|
| 328 |
+
'\xbc' # 0x0095 -> FRACTION 1/4
|
| 329 |
+
'\u2248' # 0x0096 -> ALMOST EQUAL TO
|
| 330 |
+
'\xab' # 0x0097 -> LEFT POINTING GUILLEMET
|
| 331 |
+
'\xbb' # 0x0098 -> RIGHT POINTING GUILLEMET
|
| 332 |
+
'\ufef7' # 0x0099 -> ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
|
| 333 |
+
'\ufef8' # 0x009a -> ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
|
| 334 |
+
'\ufffe' # 0x009b -> UNDEFINED
|
| 335 |
+
'\ufffe' # 0x009c -> UNDEFINED
|
| 336 |
+
'\ufefb' # 0x009d -> ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
|
| 337 |
+
'\ufefc' # 0x009e -> ARABIC LIGATURE LAM WITH ALEF FINAL FORM
|
| 338 |
+
'\ufffe' # 0x009f -> UNDEFINED
|
| 339 |
+
'\xa0' # 0x00a0 -> NON-BREAKING SPACE
|
| 340 |
+
'\xad' # 0x00a1 -> SOFT HYPHEN
|
| 341 |
+
'\ufe82' # 0x00a2 -> ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM
|
| 342 |
+
'\xa3' # 0x00a3 -> POUND SIGN
|
| 343 |
+
'\xa4' # 0x00a4 -> CURRENCY SIGN
|
| 344 |
+
'\ufe84' # 0x00a5 -> ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM
|
| 345 |
+
'\ufffe' # 0x00a6 -> UNDEFINED
|
| 346 |
+
'\ufffe' # 0x00a7 -> UNDEFINED
|
| 347 |
+
'\ufe8e' # 0x00a8 -> ARABIC LETTER ALEF FINAL FORM
|
| 348 |
+
'\ufe8f' # 0x00a9 -> ARABIC LETTER BEH ISOLATED FORM
|
| 349 |
+
'\ufe95' # 0x00aa -> ARABIC LETTER TEH ISOLATED FORM
|
| 350 |
+
'\ufe99' # 0x00ab -> ARABIC LETTER THEH ISOLATED FORM
|
| 351 |
+
'\u060c' # 0x00ac -> ARABIC COMMA
|
| 352 |
+
'\ufe9d' # 0x00ad -> ARABIC LETTER JEEM ISOLATED FORM
|
| 353 |
+
'\ufea1' # 0x00ae -> ARABIC LETTER HAH ISOLATED FORM
|
| 354 |
+
'\ufea5' # 0x00af -> ARABIC LETTER KHAH ISOLATED FORM
|
| 355 |
+
'\u0660' # 0x00b0 -> ARABIC-INDIC DIGIT ZERO
|
| 356 |
+
'\u0661' # 0x00b1 -> ARABIC-INDIC DIGIT ONE
|
| 357 |
+
'\u0662' # 0x00b2 -> ARABIC-INDIC DIGIT TWO
|
| 358 |
+
'\u0663' # 0x00b3 -> ARABIC-INDIC DIGIT THREE
|
| 359 |
+
'\u0664' # 0x00b4 -> ARABIC-INDIC DIGIT FOUR
|
| 360 |
+
'\u0665' # 0x00b5 -> ARABIC-INDIC DIGIT FIVE
|
| 361 |
+
'\u0666' # 0x00b6 -> ARABIC-INDIC DIGIT SIX
|
| 362 |
+
'\u0667' # 0x00b7 -> ARABIC-INDIC DIGIT SEVEN
|
| 363 |
+
'\u0668' # 0x00b8 -> ARABIC-INDIC DIGIT EIGHT
|
| 364 |
+
'\u0669' # 0x00b9 -> ARABIC-INDIC DIGIT NINE
|
| 365 |
+
'\ufed1' # 0x00ba -> ARABIC LETTER FEH ISOLATED FORM
|
| 366 |
+
'\u061b' # 0x00bb -> ARABIC SEMICOLON
|
| 367 |
+
'\ufeb1' # 0x00bc -> ARABIC LETTER SEEN ISOLATED FORM
|
| 368 |
+
'\ufeb5' # 0x00bd -> ARABIC LETTER SHEEN ISOLATED FORM
|
| 369 |
+
'\ufeb9' # 0x00be -> ARABIC LETTER SAD ISOLATED FORM
|
| 370 |
+
'\u061f' # 0x00bf -> ARABIC QUESTION MARK
|
| 371 |
+
'\xa2' # 0x00c0 -> CENT SIGN
|
| 372 |
+
'\ufe80' # 0x00c1 -> ARABIC LETTER HAMZA ISOLATED FORM
|
| 373 |
+
'\ufe81' # 0x00c2 -> ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM
|
| 374 |
+
'\ufe83' # 0x00c3 -> ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM
|
| 375 |
+
'\ufe85' # 0x00c4 -> ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM
|
| 376 |
+
'\ufeca' # 0x00c5 -> ARABIC LETTER AIN FINAL FORM
|
| 377 |
+
'\ufe8b' # 0x00c6 -> ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM
|
| 378 |
+
'\ufe8d' # 0x00c7 -> ARABIC LETTER ALEF ISOLATED FORM
|
| 379 |
+
'\ufe91' # 0x00c8 -> ARABIC LETTER BEH INITIAL FORM
|
| 380 |
+
'\ufe93' # 0x00c9 -> ARABIC LETTER TEH MARBUTA ISOLATED FORM
|
| 381 |
+
'\ufe97' # 0x00ca -> ARABIC LETTER TEH INITIAL FORM
|
| 382 |
+
'\ufe9b' # 0x00cb -> ARABIC LETTER THEH INITIAL FORM
|
| 383 |
+
'\ufe9f' # 0x00cc -> ARABIC LETTER JEEM INITIAL FORM
|
| 384 |
+
'\ufea3' # 0x00cd -> ARABIC LETTER HAH INITIAL FORM
|
| 385 |
+
'\ufea7' # 0x00ce -> ARABIC LETTER KHAH INITIAL FORM
|
| 386 |
+
'\ufea9' # 0x00cf -> ARABIC LETTER DAL ISOLATED FORM
|
| 387 |
+
'\ufeab' # 0x00d0 -> ARABIC LETTER THAL ISOLATED FORM
|
| 388 |
+
'\ufead' # 0x00d1 -> ARABIC LETTER REH ISOLATED FORM
|
| 389 |
+
'\ufeaf' # 0x00d2 -> ARABIC LETTER ZAIN ISOLATED FORM
|
| 390 |
+
'\ufeb3' # 0x00d3 -> ARABIC LETTER SEEN INITIAL FORM
|
| 391 |
+
'\ufeb7' # 0x00d4 -> ARABIC LETTER SHEEN INITIAL FORM
|
| 392 |
+
'\ufebb' # 0x00d5 -> ARABIC LETTER SAD INITIAL FORM
|
| 393 |
+
'\ufebf' # 0x00d6 -> ARABIC LETTER DAD INITIAL FORM
|
| 394 |
+
'\ufec1' # 0x00d7 -> ARABIC LETTER TAH ISOLATED FORM
|
| 395 |
+
'\ufec5' # 0x00d8 -> ARABIC LETTER ZAH ISOLATED FORM
|
| 396 |
+
'\ufecb' # 0x00d9 -> ARABIC LETTER AIN INITIAL FORM
|
| 397 |
+
'\ufecf' # 0x00da -> ARABIC LETTER GHAIN INITIAL FORM
|
| 398 |
+
'\xa6' # 0x00db -> BROKEN VERTICAL BAR
|
| 399 |
+
'\xac' # 0x00dc -> NOT SIGN
|
| 400 |
+
'\xf7' # 0x00dd -> DIVISION SIGN
|
| 401 |
+
'\xd7' # 0x00de -> MULTIPLICATION SIGN
|
| 402 |
+
'\ufec9' # 0x00df -> ARABIC LETTER AIN ISOLATED FORM
|
| 403 |
+
'\u0640' # 0x00e0 -> ARABIC TATWEEL
|
| 404 |
+
'\ufed3' # 0x00e1 -> ARABIC LETTER FEH INITIAL FORM
|
| 405 |
+
'\ufed7' # 0x00e2 -> ARABIC LETTER QAF INITIAL FORM
|
| 406 |
+
'\ufedb' # 0x00e3 -> ARABIC LETTER KAF INITIAL FORM
|
| 407 |
+
'\ufedf' # 0x00e4 -> ARABIC LETTER LAM INITIAL FORM
|
| 408 |
+
'\ufee3' # 0x00e5 -> ARABIC LETTER MEEM INITIAL FORM
|
| 409 |
+
'\ufee7' # 0x00e6 -> ARABIC LETTER NOON INITIAL FORM
|
| 410 |
+
'\ufeeb' # 0x00e7 -> ARABIC LETTER HEH INITIAL FORM
|
| 411 |
+
'\ufeed' # 0x00e8 -> ARABIC LETTER WAW ISOLATED FORM
|
| 412 |
+
'\ufeef' # 0x00e9 -> ARABIC LETTER ALEF MAKSURA ISOLATED FORM
|
| 413 |
+
'\ufef3' # 0x00ea -> ARABIC LETTER YEH INITIAL FORM
|
| 414 |
+
'\ufebd' # 0x00eb -> ARABIC LETTER DAD ISOLATED FORM
|
| 415 |
+
'\ufecc' # 0x00ec -> ARABIC LETTER AIN MEDIAL FORM
|
| 416 |
+
'\ufece' # 0x00ed -> ARABIC LETTER GHAIN FINAL FORM
|
| 417 |
+
'\ufecd' # 0x00ee -> ARABIC LETTER GHAIN ISOLATED FORM
|
| 418 |
+
'\ufee1' # 0x00ef -> ARABIC LETTER MEEM ISOLATED FORM
|
| 419 |
+
'\ufe7d' # 0x00f0 -> ARABIC SHADDA MEDIAL FORM
|
| 420 |
+
'\u0651' # 0x00f1 -> ARABIC SHADDAH
|
| 421 |
+
'\ufee5' # 0x00f2 -> ARABIC LETTER NOON ISOLATED FORM
|
| 422 |
+
'\ufee9' # 0x00f3 -> ARABIC LETTER HEH ISOLATED FORM
|
| 423 |
+
'\ufeec' # 0x00f4 -> ARABIC LETTER HEH MEDIAL FORM
|
| 424 |
+
'\ufef0' # 0x00f5 -> ARABIC LETTER ALEF MAKSURA FINAL FORM
|
| 425 |
+
'\ufef2' # 0x00f6 -> ARABIC LETTER YEH FINAL FORM
|
| 426 |
+
'\ufed0' # 0x00f7 -> ARABIC LETTER GHAIN MEDIAL FORM
|
| 427 |
+
'\ufed5' # 0x00f8 -> ARABIC LETTER QAF ISOLATED FORM
|
| 428 |
+
'\ufef5' # 0x00f9 -> ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
|
| 429 |
+
'\ufef6' # 0x00fa -> ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
|
| 430 |
+
'\ufedd' # 0x00fb -> ARABIC LETTER LAM ISOLATED FORM
|
| 431 |
+
'\ufed9' # 0x00fc -> ARABIC LETTER KAF ISOLATED FORM
|
| 432 |
+
'\ufef1' # 0x00fd -> ARABIC LETTER YEH ISOLATED FORM
|
| 433 |
+
'\u25a0' # 0x00fe -> BLACK SQUARE
|
| 434 |
+
'\ufffe' # 0x00ff -> UNDEFINED
|
| 435 |
+
)
|
| 436 |
+
|
| 437 |
+
### Encoding Map
|
| 438 |
+
|
| 439 |
+
encoding_map = {
|
| 440 |
+
0x0000: 0x0000, # NULL
|
| 441 |
+
0x0001: 0x0001, # START OF HEADING
|
| 442 |
+
0x0002: 0x0002, # START OF TEXT
|
| 443 |
+
0x0003: 0x0003, # END OF TEXT
|
| 444 |
+
0x0004: 0x0004, # END OF TRANSMISSION
|
| 445 |
+
0x0005: 0x0005, # ENQUIRY
|
| 446 |
+
0x0006: 0x0006, # ACKNOWLEDGE
|
| 447 |
+
0x0007: 0x0007, # BELL
|
| 448 |
+
0x0008: 0x0008, # BACKSPACE
|
| 449 |
+
0x0009: 0x0009, # HORIZONTAL TABULATION
|
| 450 |
+
0x000a: 0x000a, # LINE FEED
|
| 451 |
+
0x000b: 0x000b, # VERTICAL TABULATION
|
| 452 |
+
0x000c: 0x000c, # FORM FEED
|
| 453 |
+
0x000d: 0x000d, # CARRIAGE RETURN
|
| 454 |
+
0x000e: 0x000e, # SHIFT OUT
|
| 455 |
+
0x000f: 0x000f, # SHIFT IN
|
| 456 |
+
0x0010: 0x0010, # DATA LINK ESCAPE
|
| 457 |
+
0x0011: 0x0011, # DEVICE CONTROL ONE
|
| 458 |
+
0x0012: 0x0012, # DEVICE CONTROL TWO
|
| 459 |
+
0x0013: 0x0013, # DEVICE CONTROL THREE
|
| 460 |
+
0x0014: 0x0014, # DEVICE CONTROL FOUR
|
| 461 |
+
0x0015: 0x0015, # NEGATIVE ACKNOWLEDGE
|
| 462 |
+
0x0016: 0x0016, # SYNCHRONOUS IDLE
|
| 463 |
+
0x0017: 0x0017, # END OF TRANSMISSION BLOCK
|
| 464 |
+
0x0018: 0x0018, # CANCEL
|
| 465 |
+
0x0019: 0x0019, # END OF MEDIUM
|
| 466 |
+
0x001a: 0x001a, # SUBSTITUTE
|
| 467 |
+
0x001b: 0x001b, # ESCAPE
|
| 468 |
+
0x001c: 0x001c, # FILE SEPARATOR
|
| 469 |
+
0x001d: 0x001d, # GROUP SEPARATOR
|
| 470 |
+
0x001e: 0x001e, # RECORD SEPARATOR
|
| 471 |
+
0x001f: 0x001f, # UNIT SEPARATOR
|
| 472 |
+
0x0020: 0x0020, # SPACE
|
| 473 |
+
0x0021: 0x0021, # EXCLAMATION MARK
|
| 474 |
+
0x0022: 0x0022, # QUOTATION MARK
|
| 475 |
+
0x0023: 0x0023, # NUMBER SIGN
|
| 476 |
+
0x0024: 0x0024, # DOLLAR SIGN
|
| 477 |
+
0x0026: 0x0026, # AMPERSAND
|
| 478 |
+
0x0027: 0x0027, # APOSTROPHE
|
| 479 |
+
0x0028: 0x0028, # LEFT PARENTHESIS
|
| 480 |
+
0x0029: 0x0029, # RIGHT PARENTHESIS
|
| 481 |
+
0x002a: 0x002a, # ASTERISK
|
| 482 |
+
0x002b: 0x002b, # PLUS SIGN
|
| 483 |
+
0x002c: 0x002c, # COMMA
|
| 484 |
+
0x002d: 0x002d, # HYPHEN-MINUS
|
| 485 |
+
0x002e: 0x002e, # FULL STOP
|
| 486 |
+
0x002f: 0x002f, # SOLIDUS
|
| 487 |
+
0x0030: 0x0030, # DIGIT ZERO
|
| 488 |
+
0x0031: 0x0031, # DIGIT ONE
|
| 489 |
+
0x0032: 0x0032, # DIGIT TWO
|
| 490 |
+
0x0033: 0x0033, # DIGIT THREE
|
| 491 |
+
0x0034: 0x0034, # DIGIT FOUR
|
| 492 |
+
0x0035: 0x0035, # DIGIT FIVE
|
| 493 |
+
0x0036: 0x0036, # DIGIT SIX
|
| 494 |
+
0x0037: 0x0037, # DIGIT SEVEN
|
| 495 |
+
0x0038: 0x0038, # DIGIT EIGHT
|
| 496 |
+
0x0039: 0x0039, # DIGIT NINE
|
| 497 |
+
0x003a: 0x003a, # COLON
|
| 498 |
+
0x003b: 0x003b, # SEMICOLON
|
| 499 |
+
0x003c: 0x003c, # LESS-THAN SIGN
|
| 500 |
+
0x003d: 0x003d, # EQUALS SIGN
|
| 501 |
+
0x003e: 0x003e, # GREATER-THAN SIGN
|
| 502 |
+
0x003f: 0x003f, # QUESTION MARK
|
| 503 |
+
0x0040: 0x0040, # COMMERCIAL AT
|
| 504 |
+
0x0041: 0x0041, # LATIN CAPITAL LETTER A
|
| 505 |
+
0x0042: 0x0042, # LATIN CAPITAL LETTER B
|
| 506 |
+
0x0043: 0x0043, # LATIN CAPITAL LETTER C
|
| 507 |
+
0x0044: 0x0044, # LATIN CAPITAL LETTER D
|
| 508 |
+
0x0045: 0x0045, # LATIN CAPITAL LETTER E
|
| 509 |
+
0x0046: 0x0046, # LATIN CAPITAL LETTER F
|
| 510 |
+
0x0047: 0x0047, # LATIN CAPITAL LETTER G
|
| 511 |
+
0x0048: 0x0048, # LATIN CAPITAL LETTER H
|
| 512 |
+
0x0049: 0x0049, # LATIN CAPITAL LETTER I
|
| 513 |
+
0x004a: 0x004a, # LATIN CAPITAL LETTER J
|
| 514 |
+
0x004b: 0x004b, # LATIN CAPITAL LETTER K
|
| 515 |
+
0x004c: 0x004c, # LATIN CAPITAL LETTER L
|
| 516 |
+
0x004d: 0x004d, # LATIN CAPITAL LETTER M
|
| 517 |
+
0x004e: 0x004e, # LATIN CAPITAL LETTER N
|
| 518 |
+
0x004f: 0x004f, # LATIN CAPITAL LETTER O
|
| 519 |
+
0x0050: 0x0050, # LATIN CAPITAL LETTER P
|
| 520 |
+
0x0051: 0x0051, # LATIN CAPITAL LETTER Q
|
| 521 |
+
0x0052: 0x0052, # LATIN CAPITAL LETTER R
|
| 522 |
+
0x0053: 0x0053, # LATIN CAPITAL LETTER S
|
| 523 |
+
0x0054: 0x0054, # LATIN CAPITAL LETTER T
|
| 524 |
+
0x0055: 0x0055, # LATIN CAPITAL LETTER U
|
| 525 |
+
0x0056: 0x0056, # LATIN CAPITAL LETTER V
|
| 526 |
+
0x0057: 0x0057, # LATIN CAPITAL LETTER W
|
| 527 |
+
0x0058: 0x0058, # LATIN CAPITAL LETTER X
|
| 528 |
+
0x0059: 0x0059, # LATIN CAPITAL LETTER Y
|
| 529 |
+
0x005a: 0x005a, # LATIN CAPITAL LETTER Z
|
| 530 |
+
0x005b: 0x005b, # LEFT SQUARE BRACKET
|
| 531 |
+
0x005c: 0x005c, # REVERSE SOLIDUS
|
| 532 |
+
0x005d: 0x005d, # RIGHT SQUARE BRACKET
|
| 533 |
+
0x005e: 0x005e, # CIRCUMFLEX ACCENT
|
| 534 |
+
0x005f: 0x005f, # LOW LINE
|
| 535 |
+
0x0060: 0x0060, # GRAVE ACCENT
|
| 536 |
+
0x0061: 0x0061, # LATIN SMALL LETTER A
|
| 537 |
+
0x0062: 0x0062, # LATIN SMALL LETTER B
|
| 538 |
+
0x0063: 0x0063, # LATIN SMALL LETTER C
|
| 539 |
+
0x0064: 0x0064, # LATIN SMALL LETTER D
|
| 540 |
+
0x0065: 0x0065, # LATIN SMALL LETTER E
|
| 541 |
+
0x0066: 0x0066, # LATIN SMALL LETTER F
|
| 542 |
+
0x0067: 0x0067, # LATIN SMALL LETTER G
|
| 543 |
+
0x0068: 0x0068, # LATIN SMALL LETTER H
|
| 544 |
+
0x0069: 0x0069, # LATIN SMALL LETTER I
|
| 545 |
+
0x006a: 0x006a, # LATIN SMALL LETTER J
|
| 546 |
+
0x006b: 0x006b, # LATIN SMALL LETTER K
|
| 547 |
+
0x006c: 0x006c, # LATIN SMALL LETTER L
|
| 548 |
+
0x006d: 0x006d, # LATIN SMALL LETTER M
|
| 549 |
+
0x006e: 0x006e, # LATIN SMALL LETTER N
|
| 550 |
+
0x006f: 0x006f, # LATIN SMALL LETTER O
|
| 551 |
+
0x0070: 0x0070, # LATIN SMALL LETTER P
|
| 552 |
+
0x0071: 0x0071, # LATIN SMALL LETTER Q
|
| 553 |
+
0x0072: 0x0072, # LATIN SMALL LETTER R
|
| 554 |
+
0x0073: 0x0073, # LATIN SMALL LETTER S
|
| 555 |
+
0x0074: 0x0074, # LATIN SMALL LETTER T
|
| 556 |
+
0x0075: 0x0075, # LATIN SMALL LETTER U
|
| 557 |
+
0x0076: 0x0076, # LATIN SMALL LETTER V
|
| 558 |
+
0x0077: 0x0077, # LATIN SMALL LETTER W
|
| 559 |
+
0x0078: 0x0078, # LATIN SMALL LETTER X
|
| 560 |
+
0x0079: 0x0079, # LATIN SMALL LETTER Y
|
| 561 |
+
0x007a: 0x007a, # LATIN SMALL LETTER Z
|
| 562 |
+
0x007b: 0x007b, # LEFT CURLY BRACKET
|
| 563 |
+
0x007c: 0x007c, # VERTICAL LINE
|
| 564 |
+
0x007d: 0x007d, # RIGHT CURLY BRACKET
|
| 565 |
+
0x007e: 0x007e, # TILDE
|
| 566 |
+
0x007f: 0x007f, # DELETE
|
| 567 |
+
0x00a0: 0x00a0, # NON-BREAKING SPACE
|
| 568 |
+
0x00a2: 0x00c0, # CENT SIGN
|
| 569 |
+
0x00a3: 0x00a3, # POUND SIGN
|
| 570 |
+
0x00a4: 0x00a4, # CURRENCY SIGN
|
| 571 |
+
0x00a6: 0x00db, # BROKEN VERTICAL BAR
|
| 572 |
+
0x00ab: 0x0097, # LEFT POINTING GUILLEMET
|
| 573 |
+
0x00ac: 0x00dc, # NOT SIGN
|
| 574 |
+
0x00ad: 0x00a1, # SOFT HYPHEN
|
| 575 |
+
0x00b0: 0x0080, # DEGREE SIGN
|
| 576 |
+
0x00b1: 0x0093, # PLUS-OR-MINUS SIGN
|
| 577 |
+
0x00b7: 0x0081, # MIDDLE DOT
|
| 578 |
+
0x00bb: 0x0098, # RIGHT POINTING GUILLEMET
|
| 579 |
+
0x00bc: 0x0095, # FRACTION 1/4
|
| 580 |
+
0x00bd: 0x0094, # FRACTION 1/2
|
| 581 |
+
0x00d7: 0x00de, # MULTIPLICATION SIGN
|
| 582 |
+
0x00f7: 0x00dd, # DIVISION SIGN
|
| 583 |
+
0x03b2: 0x0090, # GREEK SMALL BETA
|
| 584 |
+
0x03c6: 0x0092, # GREEK SMALL PHI
|
| 585 |
+
0x060c: 0x00ac, # ARABIC COMMA
|
| 586 |
+
0x061b: 0x00bb, # ARABIC SEMICOLON
|
| 587 |
+
0x061f: 0x00bf, # ARABIC QUESTION MARK
|
| 588 |
+
0x0640: 0x00e0, # ARABIC TATWEEL
|
| 589 |
+
0x0651: 0x00f1, # ARABIC SHADDAH
|
| 590 |
+
0x0660: 0x00b0, # ARABIC-INDIC DIGIT ZERO
|
| 591 |
+
0x0661: 0x00b1, # ARABIC-INDIC DIGIT ONE
|
| 592 |
+
0x0662: 0x00b2, # ARABIC-INDIC DIGIT TWO
|
| 593 |
+
0x0663: 0x00b3, # ARABIC-INDIC DIGIT THREE
|
| 594 |
+
0x0664: 0x00b4, # ARABIC-INDIC DIGIT FOUR
|
| 595 |
+
0x0665: 0x00b5, # ARABIC-INDIC DIGIT FIVE
|
| 596 |
+
0x0666: 0x00b6, # ARABIC-INDIC DIGIT SIX
|
| 597 |
+
0x0667: 0x00b7, # ARABIC-INDIC DIGIT SEVEN
|
| 598 |
+
0x0668: 0x00b8, # ARABIC-INDIC DIGIT EIGHT
|
| 599 |
+
0x0669: 0x00b9, # ARABIC-INDIC DIGIT NINE
|
| 600 |
+
0x066a: 0x0025, # ARABIC PERCENT SIGN
|
| 601 |
+
0x2219: 0x0082, # BULLET OPERATOR
|
| 602 |
+
0x221a: 0x0083, # SQUARE ROOT
|
| 603 |
+
0x221e: 0x0091, # INFINITY
|
| 604 |
+
0x2248: 0x0096, # ALMOST EQUAL TO
|
| 605 |
+
0x2500: 0x0085, # FORMS LIGHT HORIZONTAL
|
| 606 |
+
0x2502: 0x0086, # FORMS LIGHT VERTICAL
|
| 607 |
+
0x250c: 0x008d, # FORMS LIGHT DOWN AND RIGHT
|
| 608 |
+
0x2510: 0x008c, # FORMS LIGHT DOWN AND LEFT
|
| 609 |
+
0x2514: 0x008e, # FORMS LIGHT UP AND RIGHT
|
| 610 |
+
0x2518: 0x008f, # FORMS LIGHT UP AND LEFT
|
| 611 |
+
0x251c: 0x008a, # FORMS LIGHT VERTICAL AND RIGHT
|
| 612 |
+
0x2524: 0x0088, # FORMS LIGHT VERTICAL AND LEFT
|
| 613 |
+
0x252c: 0x0089, # FORMS LIGHT DOWN AND HORIZONTAL
|
| 614 |
+
0x2534: 0x008b, # FORMS LIGHT UP AND HORIZONTAL
|
| 615 |
+
0x253c: 0x0087, # FORMS LIGHT VERTICAL AND HORIZONTAL
|
| 616 |
+
0x2592: 0x0084, # MEDIUM SHADE
|
| 617 |
+
0x25a0: 0x00fe, # BLACK SQUARE
|
| 618 |
+
0xfe7d: 0x00f0, # ARABIC SHADDA MEDIAL FORM
|
| 619 |
+
0xfe80: 0x00c1, # ARABIC LETTER HAMZA ISOLATED FORM
|
| 620 |
+
0xfe81: 0x00c2, # ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM
|
| 621 |
+
0xfe82: 0x00a2, # ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM
|
| 622 |
+
0xfe83: 0x00c3, # ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM
|
| 623 |
+
0xfe84: 0x00a5, # ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM
|
| 624 |
+
0xfe85: 0x00c4, # ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM
|
| 625 |
+
0xfe8b: 0x00c6, # ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM
|
| 626 |
+
0xfe8d: 0x00c7, # ARABIC LETTER ALEF ISOLATED FORM
|
| 627 |
+
0xfe8e: 0x00a8, # ARABIC LETTER ALEF FINAL FORM
|
| 628 |
+
0xfe8f: 0x00a9, # ARABIC LETTER BEH ISOLATED FORM
|
| 629 |
+
0xfe91: 0x00c8, # ARABIC LETTER BEH INITIAL FORM
|
| 630 |
+
0xfe93: 0x00c9, # ARABIC LETTER TEH MARBUTA ISOLATED FORM
|
| 631 |
+
0xfe95: 0x00aa, # ARABIC LETTER TEH ISOLATED FORM
|
| 632 |
+
0xfe97: 0x00ca, # ARABIC LETTER TEH INITIAL FORM
|
| 633 |
+
0xfe99: 0x00ab, # ARABIC LETTER THEH ISOLATED FORM
|
| 634 |
+
0xfe9b: 0x00cb, # ARABIC LETTER THEH INITIAL FORM
|
| 635 |
+
0xfe9d: 0x00ad, # ARABIC LETTER JEEM ISOLATED FORM
|
| 636 |
+
0xfe9f: 0x00cc, # ARABIC LETTER JEEM INITIAL FORM
|
| 637 |
+
0xfea1: 0x00ae, # ARABIC LETTER HAH ISOLATED FORM
|
| 638 |
+
0xfea3: 0x00cd, # ARABIC LETTER HAH INITIAL FORM
|
| 639 |
+
0xfea5: 0x00af, # ARABIC LETTER KHAH ISOLATED FORM
|
| 640 |
+
0xfea7: 0x00ce, # ARABIC LETTER KHAH INITIAL FORM
|
| 641 |
+
0xfea9: 0x00cf, # ARABIC LETTER DAL ISOLATED FORM
|
| 642 |
+
0xfeab: 0x00d0, # ARABIC LETTER THAL ISOLATED FORM
|
| 643 |
+
0xfead: 0x00d1, # ARABIC LETTER REH ISOLATED FORM
|
| 644 |
+
0xfeaf: 0x00d2, # ARABIC LETTER ZAIN ISOLATED FORM
|
| 645 |
+
0xfeb1: 0x00bc, # ARABIC LETTER SEEN ISOLATED FORM
|
| 646 |
+
0xfeb3: 0x00d3, # ARABIC LETTER SEEN INITIAL FORM
|
| 647 |
+
0xfeb5: 0x00bd, # ARABIC LETTER SHEEN ISOLATED FORM
|
| 648 |
+
0xfeb7: 0x00d4, # ARABIC LETTER SHEEN INITIAL FORM
|
| 649 |
+
0xfeb9: 0x00be, # ARABIC LETTER SAD ISOLATED FORM
|
| 650 |
+
0xfebb: 0x00d5, # ARABIC LETTER SAD INITIAL FORM
|
| 651 |
+
0xfebd: 0x00eb, # ARABIC LETTER DAD ISOLATED FORM
|
| 652 |
+
0xfebf: 0x00d6, # ARABIC LETTER DAD INITIAL FORM
|
| 653 |
+
0xfec1: 0x00d7, # ARABIC LETTER TAH ISOLATED FORM
|
| 654 |
+
0xfec5: 0x00d8, # ARABIC LETTER ZAH ISOLATED FORM
|
| 655 |
+
0xfec9: 0x00df, # ARABIC LETTER AIN ISOLATED FORM
|
| 656 |
+
0xfeca: 0x00c5, # ARABIC LETTER AIN FINAL FORM
|
| 657 |
+
0xfecb: 0x00d9, # ARABIC LETTER AIN INITIAL FORM
|
| 658 |
+
0xfecc: 0x00ec, # ARABIC LETTER AIN MEDIAL FORM
|
| 659 |
+
0xfecd: 0x00ee, # ARABIC LETTER GHAIN ISOLATED FORM
|
| 660 |
+
0xfece: 0x00ed, # ARABIC LETTER GHAIN FINAL FORM
|
| 661 |
+
0xfecf: 0x00da, # ARABIC LETTER GHAIN INITIAL FORM
|
| 662 |
+
0xfed0: 0x00f7, # ARABIC LETTER GHAIN MEDIAL FORM
|
| 663 |
+
0xfed1: 0x00ba, # ARABIC LETTER FEH ISOLATED FORM
|
| 664 |
+
0xfed3: 0x00e1, # ARABIC LETTER FEH INITIAL FORM
|
| 665 |
+
0xfed5: 0x00f8, # ARABIC LETTER QAF ISOLATED FORM
|
| 666 |
+
0xfed7: 0x00e2, # ARABIC LETTER QAF INITIAL FORM
|
| 667 |
+
0xfed9: 0x00fc, # ARABIC LETTER KAF ISOLATED FORM
|
| 668 |
+
0xfedb: 0x00e3, # ARABIC LETTER KAF INITIAL FORM
|
| 669 |
+
0xfedd: 0x00fb, # ARABIC LETTER LAM ISOLATED FORM
|
| 670 |
+
0xfedf: 0x00e4, # ARABIC LETTER LAM INITIAL FORM
|
| 671 |
+
0xfee1: 0x00ef, # ARABIC LETTER MEEM ISOLATED FORM
|
| 672 |
+
0xfee3: 0x00e5, # ARABIC LETTER MEEM INITIAL FORM
|
| 673 |
+
0xfee5: 0x00f2, # ARABIC LETTER NOON ISOLATED FORM
|
| 674 |
+
0xfee7: 0x00e6, # ARABIC LETTER NOON INITIAL FORM
|
| 675 |
+
0xfee9: 0x00f3, # ARABIC LETTER HEH ISOLATED FORM
|
| 676 |
+
0xfeeb: 0x00e7, # ARABIC LETTER HEH INITIAL FORM
|
| 677 |
+
0xfeec: 0x00f4, # ARABIC LETTER HEH MEDIAL FORM
|
| 678 |
+
0xfeed: 0x00e8, # ARABIC LETTER WAW ISOLATED FORM
|
| 679 |
+
0xfeef: 0x00e9, # ARABIC LETTER ALEF MAKSURA ISOLATED FORM
|
| 680 |
+
0xfef0: 0x00f5, # ARABIC LETTER ALEF MAKSURA FINAL FORM
|
| 681 |
+
0xfef1: 0x00fd, # ARABIC LETTER YEH ISOLATED FORM
|
| 682 |
+
0xfef2: 0x00f6, # ARABIC LETTER YEH FINAL FORM
|
| 683 |
+
0xfef3: 0x00ea, # ARABIC LETTER YEH INITIAL FORM
|
| 684 |
+
0xfef5: 0x00f9, # ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
|
| 685 |
+
0xfef6: 0x00fa, # ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
|
| 686 |
+
0xfef7: 0x0099, # ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
|
| 687 |
+
0xfef8: 0x009a, # ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
|
| 688 |
+
0xfefb: 0x009d, # ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
|
| 689 |
+
0xfefc: 0x009e, # ARABIC LIGATURE LAM WITH ALEF FINAL FORM
|
| 690 |
+
}
|
pllava/lib/python3.10/encodings/hp_roman8.py
ADDED
|
@@ -0,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er User's Manual HP part no
|
| 6 |
+
33471-90901, Hewlet-Packard, June 1989.
|
| 7 |
+
|
| 8 |
+
(Used with permission)
|
| 9 |
+
|
| 10 |
+
"""#"
|
| 11 |
+
|
| 12 |
+
import codecs
|
| 13 |
+
|
| 14 |
+
### Codec APIs
|
| 15 |
+
|
| 16 |
+
class Codec(codecs.Codec):
|
| 17 |
+
|
| 18 |
+
def encode(self,input,errors='strict'):
|
| 19 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 20 |
+
|
| 21 |
+
def decode(self,input,errors='strict'):
|
| 22 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 23 |
+
|
| 24 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 25 |
+
def encode(self, input, final=False):
|
| 26 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 27 |
+
|
| 28 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 29 |
+
def decode(self, input, final=False):
|
| 30 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 31 |
+
|
| 32 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 33 |
+
pass
|
| 34 |
+
|
| 35 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 36 |
+
pass
|
| 37 |
+
|
| 38 |
+
### encodings module API
|
| 39 |
+
|
| 40 |
+
def getregentry():
|
| 41 |
+
return codecs.CodecInfo(
|
| 42 |
+
name='hp-roman8',
|
| 43 |
+
encode=Codec().encode,
|
| 44 |
+
decode=Codec().decode,
|
| 45 |
+
incrementalencoder=IncrementalEncoder,
|
| 46 |
+
incrementaldecoder=IncrementalDecoder,
|
| 47 |
+
streamwriter=StreamWriter,
|
| 48 |
+
streamreader=StreamReader,
|
| 49 |
+
)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
### Decoding Table
|
| 53 |
+
|
| 54 |
+
decoding_table = (
|
| 55 |
+
'\x00' # 0x00 -> NULL
|
| 56 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 57 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 58 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 59 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 60 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 61 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 62 |
+
'\x07' # 0x07 -> BELL
|
| 63 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 64 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 65 |
+
'\n' # 0x0A -> LINE FEED
|
| 66 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 67 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 68 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 69 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 70 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 71 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 72 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 73 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 74 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 75 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 76 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 77 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 78 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 79 |
+
'\x18' # 0x18 -> CANCEL
|
| 80 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 81 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 82 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 83 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 84 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 85 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 86 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 87 |
+
' ' # 0x20 -> SPACE
|
| 88 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 89 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 90 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 91 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 92 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 93 |
+
'&' # 0x26 -> AMPERSAND
|
| 94 |
+
"'" # 0x27 -> APOSTROPHE
|
| 95 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 96 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 97 |
+
'*' # 0x2A -> ASTERISK
|
| 98 |
+
'+' # 0x2B -> PLUS SIGN
|
| 99 |
+
',' # 0x2C -> COMMA
|
| 100 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 101 |
+
'.' # 0x2E -> FULL STOP
|
| 102 |
+
'/' # 0x2F -> SOLIDUS
|
| 103 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 104 |
+
'1' # 0x31 -> DIGIT ONE
|
| 105 |
+
'2' # 0x32 -> DIGIT TWO
|
| 106 |
+
'3' # 0x33 -> DIGIT THREE
|
| 107 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 108 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 109 |
+
'6' # 0x36 -> DIGIT SIX
|
| 110 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 111 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 112 |
+
'9' # 0x39 -> DIGIT NINE
|
| 113 |
+
':' # 0x3A -> COLON
|
| 114 |
+
';' # 0x3B -> SEMICOLON
|
| 115 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 116 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 117 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 118 |
+
'?' # 0x3F -> QUESTION MARK
|
| 119 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 120 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 121 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 122 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 123 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 124 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 125 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 126 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 127 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 128 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 129 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 130 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 131 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 132 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 133 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 134 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 135 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 136 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 137 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 138 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 139 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 140 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 141 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 142 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 143 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 144 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 145 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 146 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 147 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 148 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 149 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 150 |
+
'_' # 0x5F -> LOW LINE
|
| 151 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 152 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 153 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 154 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 155 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 156 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 157 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 158 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 159 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 160 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 161 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 162 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 163 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 164 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 165 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 166 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 167 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 168 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 169 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 170 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 171 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 172 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 173 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 174 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 175 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 176 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 177 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 178 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 179 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 180 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 181 |
+
'~' # 0x7E -> TILDE
|
| 182 |
+
'\x7f' # 0x7F -> DELETE
|
| 183 |
+
'\x80' # 0x80 -> <control>
|
| 184 |
+
'\x81' # 0x81 -> <control>
|
| 185 |
+
'\x82' # 0x82 -> <control>
|
| 186 |
+
'\x83' # 0x83 -> <control>
|
| 187 |
+
'\x84' # 0x84 -> <control>
|
| 188 |
+
'\x85' # 0x85 -> <control>
|
| 189 |
+
'\x86' # 0x86 -> <control>
|
| 190 |
+
'\x87' # 0x87 -> <control>
|
| 191 |
+
'\x88' # 0x88 -> <control>
|
| 192 |
+
'\x89' # 0x89 -> <control>
|
| 193 |
+
'\x8a' # 0x8A -> <control>
|
| 194 |
+
'\x8b' # 0x8B -> <control>
|
| 195 |
+
'\x8c' # 0x8C -> <control>
|
| 196 |
+
'\x8d' # 0x8D -> <control>
|
| 197 |
+
'\x8e' # 0x8E -> <control>
|
| 198 |
+
'\x8f' # 0x8F -> <control>
|
| 199 |
+
'\x90' # 0x90 -> <control>
|
| 200 |
+
'\x91' # 0x91 -> <control>
|
| 201 |
+
'\x92' # 0x92 -> <control>
|
| 202 |
+
'\x93' # 0x93 -> <control>
|
| 203 |
+
'\x94' # 0x94 -> <control>
|
| 204 |
+
'\x95' # 0x95 -> <control>
|
| 205 |
+
'\x96' # 0x96 -> <control>
|
| 206 |
+
'\x97' # 0x97 -> <control>
|
| 207 |
+
'\x98' # 0x98 -> <control>
|
| 208 |
+
'\x99' # 0x99 -> <control>
|
| 209 |
+
'\x9a' # 0x9A -> <control>
|
| 210 |
+
'\x9b' # 0x9B -> <control>
|
| 211 |
+
'\x9c' # 0x9C -> <control>
|
| 212 |
+
'\x9d' # 0x9D -> <control>
|
| 213 |
+
'\x9e' # 0x9E -> <control>
|
| 214 |
+
'\x9f' # 0x9F -> <control>
|
| 215 |
+
'\xa0' # 0xA0 -> NO-BREAK SPACE
|
| 216 |
+
'\xc0' # 0xA1 -> LATIN CAPITAL LETTER A WITH GRAVE
|
| 217 |
+
'\xc2' # 0xA2 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
| 218 |
+
'\xc8' # 0xA3 -> LATIN CAPITAL LETTER E WITH GRAVE
|
| 219 |
+
'\xca' # 0xA4 -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
| 220 |
+
'\xcb' # 0xA5 -> LATIN CAPITAL LETTER E WITH DIAERESIS
|
| 221 |
+
'\xce' # 0xA6 -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
| 222 |
+
'\xcf' # 0xA7 -> LATIN CAPITAL LETTER I WITH DIAERESIS
|
| 223 |
+
'\xb4' # 0xA8 -> ACUTE ACCENT
|
| 224 |
+
'\u02cb' # 0xA9 -> MODIFIER LETTER GRAVE ACCENT (MANDARIN CHINESE FOURTH TONE)
|
| 225 |
+
'\u02c6' # 0xAA -> MODIFIER LETTER CIRCUMFLEX ACCENT
|
| 226 |
+
'\xa8' # 0xAB -> DIAERESIS
|
| 227 |
+
'\u02dc' # 0xAC -> SMALL TILDE
|
| 228 |
+
'\xd9' # 0xAD -> LATIN CAPITAL LETTER U WITH GRAVE
|
| 229 |
+
'\xdb' # 0xAE -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
| 230 |
+
'\u20a4' # 0xAF -> LIRA SIGN
|
| 231 |
+
'\xaf' # 0xB0 -> MACRON
|
| 232 |
+
'\xdd' # 0xB1 -> LATIN CAPITAL LETTER Y WITH ACUTE
|
| 233 |
+
'\xfd' # 0xB2 -> LATIN SMALL LETTER Y WITH ACUTE
|
| 234 |
+
'\xb0' # 0xB3 -> DEGREE SIGN
|
| 235 |
+
'\xc7' # 0xB4 -> LATIN CAPITAL LETTER C WITH CEDILLA
|
| 236 |
+
'\xe7' # 0xB5 -> LATIN SMALL LETTER C WITH CEDILLA
|
| 237 |
+
'\xd1' # 0xB6 -> LATIN CAPITAL LETTER N WITH TILDE
|
| 238 |
+
'\xf1' # 0xB7 -> LATIN SMALL LETTER N WITH TILDE
|
| 239 |
+
'\xa1' # 0xB8 -> INVERTED EXCLAMATION MARK
|
| 240 |
+
'\xbf' # 0xB9 -> INVERTED QUESTION MARK
|
| 241 |
+
'\xa4' # 0xBA -> CURRENCY SIGN
|
| 242 |
+
'\xa3' # 0xBB -> POUND SIGN
|
| 243 |
+
'\xa5' # 0xBC -> YEN SIGN
|
| 244 |
+
'\xa7' # 0xBD -> SECTION SIGN
|
| 245 |
+
'\u0192' # 0xBE -> LATIN SMALL LETTER F WITH HOOK
|
| 246 |
+
'\xa2' # 0xBF -> CENT SIGN
|
| 247 |
+
'\xe2' # 0xC0 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
|
| 248 |
+
'\xea' # 0xC1 -> LATIN SMALL LETTER E WITH CIRCUMFLEX
|
| 249 |
+
'\xf4' # 0xC2 -> LATIN SMALL LETTER O WITH CIRCUMFLEX
|
| 250 |
+
'\xfb' # 0xC3 -> LATIN SMALL LETTER U WITH CIRCUMFLEX
|
| 251 |
+
'\xe1' # 0xC4 -> LATIN SMALL LETTER A WITH ACUTE
|
| 252 |
+
'\xe9' # 0xC5 -> LATIN SMALL LETTER E WITH ACUTE
|
| 253 |
+
'\xf3' # 0xC6 -> LATIN SMALL LETTER O WITH ACUTE
|
| 254 |
+
'\xfa' # 0xC7 -> LATIN SMALL LETTER U WITH ACUTE
|
| 255 |
+
'\xe0' # 0xC8 -> LATIN SMALL LETTER A WITH GRAVE
|
| 256 |
+
'\xe8' # 0xC9 -> LATIN SMALL LETTER E WITH GRAVE
|
| 257 |
+
'\xf2' # 0xCA -> LATIN SMALL LETTER O WITH GRAVE
|
| 258 |
+
'\xf9' # 0xCB -> LATIN SMALL LETTER U WITH GRAVE
|
| 259 |
+
'\xe4' # 0xCC -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 260 |
+
'\xeb' # 0xCD -> LATIN SMALL LETTER E WITH DIAERESIS
|
| 261 |
+
'\xf6' # 0xCE -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 262 |
+
'\xfc' # 0xCF -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 263 |
+
'\xc5' # 0xD0 -> LATIN CAPITAL LETTER A WITH RING ABOVE
|
| 264 |
+
'\xee' # 0xD1 -> LATIN SMALL LETTER I WITH CIRCUMFLEX
|
| 265 |
+
'\xd8' # 0xD2 -> LATIN CAPITAL LETTER O WITH STROKE
|
| 266 |
+
'\xc6' # 0xD3 -> LATIN CAPITAL LETTER AE
|
| 267 |
+
'\xe5' # 0xD4 -> LATIN SMALL LETTER A WITH RING ABOVE
|
| 268 |
+
'\xed' # 0xD5 -> LATIN SMALL LETTER I WITH ACUTE
|
| 269 |
+
'\xf8' # 0xD6 -> LATIN SMALL LETTER O WITH STROKE
|
| 270 |
+
'\xe6' # 0xD7 -> LATIN SMALL LETTER AE
|
| 271 |
+
'\xc4' # 0xD8 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 272 |
+
'\xec' # 0xD9 -> LATIN SMALL LETTER I WITH GRAVE
|
| 273 |
+
'\xd6' # 0xDA -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 274 |
+
'\xdc' # 0xDB -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 275 |
+
'\xc9' # 0xDC -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 276 |
+
'\xef' # 0xDD -> LATIN SMALL LETTER I WITH DIAERESIS
|
| 277 |
+
'\xdf' # 0xDE -> LATIN SMALL LETTER SHARP S (GERMAN)
|
| 278 |
+
'\xd4' # 0xDF -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
| 279 |
+
'\xc1' # 0xE0 -> LATIN CAPITAL LETTER A WITH ACUTE
|
| 280 |
+
'\xc3' # 0xE1 -> LATIN CAPITAL LETTER A WITH TILDE
|
| 281 |
+
'\xe3' # 0xE2 -> LATIN SMALL LETTER A WITH TILDE
|
| 282 |
+
'\xd0' # 0xE3 -> LATIN CAPITAL LETTER ETH (ICELANDIC)
|
| 283 |
+
'\xf0' # 0xE4 -> LATIN SMALL LETTER ETH (ICELANDIC)
|
| 284 |
+
'\xcd' # 0xE5 -> LATIN CAPITAL LETTER I WITH ACUTE
|
| 285 |
+
'\xcc' # 0xE6 -> LATIN CAPITAL LETTER I WITH GRAVE
|
| 286 |
+
'\xd3' # 0xE7 -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 287 |
+
'\xd2' # 0xE8 -> LATIN CAPITAL LETTER O WITH GRAVE
|
| 288 |
+
'\xd5' # 0xE9 -> LATIN CAPITAL LETTER O WITH TILDE
|
| 289 |
+
'\xf5' # 0xEA -> LATIN SMALL LETTER O WITH TILDE
|
| 290 |
+
'\u0160' # 0xEB -> LATIN CAPITAL LETTER S WITH CARON
|
| 291 |
+
'\u0161' # 0xEC -> LATIN SMALL LETTER S WITH CARON
|
| 292 |
+
'\xda' # 0xED -> LATIN CAPITAL LETTER U WITH ACUTE
|
| 293 |
+
'\u0178' # 0xEE -> LATIN CAPITAL LETTER Y WITH DIAERESIS
|
| 294 |
+
'\xff' # 0xEF -> LATIN SMALL LETTER Y WITH DIAERESIS
|
| 295 |
+
'\xde' # 0xF0 -> LATIN CAPITAL LETTER THORN (ICELANDIC)
|
| 296 |
+
'\xfe' # 0xF1 -> LATIN SMALL LETTER THORN (ICELANDIC)
|
| 297 |
+
'\xb7' # 0xF2 -> MIDDLE DOT
|
| 298 |
+
'\xb5' # 0xF3 -> MICRO SIGN
|
| 299 |
+
'\xb6' # 0xF4 -> PILCROW SIGN
|
| 300 |
+
'\xbe' # 0xF5 -> VULGAR FRACTION THREE QUARTERS
|
| 301 |
+
'\u2014' # 0xF6 -> EM DASH
|
| 302 |
+
'\xbc' # 0xF7 -> VULGAR FRACTION ONE QUARTER
|
| 303 |
+
'\xbd' # 0xF8 -> VULGAR FRACTION ONE HALF
|
| 304 |
+
'\xaa' # 0xF9 -> FEMININE ORDINAL INDICATOR
|
| 305 |
+
'\xba' # 0xFA -> MASCULINE ORDINAL INDICATOR
|
| 306 |
+
'\xab' # 0xFB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 307 |
+
'\u25a0' # 0xFC -> BLACK SQUARE
|
| 308 |
+
'\xbb' # 0xFD -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 309 |
+
'\xb1' # 0xFE -> PLUS-MINUS SIGN
|
| 310 |
+
'\ufffe'
|
| 311 |
+
)
|
| 312 |
+
|
| 313 |
+
### Encoding table
|
| 314 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/iso2022_jp_1.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# iso2022_jp_1.py: Python Unicode Codec for ISO2022_JP_1
|
| 3 |
+
#
|
| 4 |
+
# Written by Hye-Shik Chang <perky@FreeBSD.org>
|
| 5 |
+
#
|
| 6 |
+
|
| 7 |
+
import _codecs_iso2022, codecs
|
| 8 |
+
import _multibytecodec as mbc
|
| 9 |
+
|
| 10 |
+
codec = _codecs_iso2022.getcodec('iso2022_jp_1')
|
| 11 |
+
|
| 12 |
+
class Codec(codecs.Codec):
|
| 13 |
+
encode = codec.encode
|
| 14 |
+
decode = codec.decode
|
| 15 |
+
|
| 16 |
+
class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
|
| 17 |
+
codecs.IncrementalEncoder):
|
| 18 |
+
codec = codec
|
| 19 |
+
|
| 20 |
+
class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
|
| 21 |
+
codecs.IncrementalDecoder):
|
| 22 |
+
codec = codec
|
| 23 |
+
|
| 24 |
+
class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
|
| 25 |
+
codec = codec
|
| 26 |
+
|
| 27 |
+
class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
|
| 28 |
+
codec = codec
|
| 29 |
+
|
| 30 |
+
def getregentry():
|
| 31 |
+
return codecs.CodecInfo(
|
| 32 |
+
name='iso2022_jp_1',
|
| 33 |
+
encode=Codec().encode,
|
| 34 |
+
decode=Codec().decode,
|
| 35 |
+
incrementalencoder=IncrementalEncoder,
|
| 36 |
+
incrementaldecoder=IncrementalDecoder,
|
| 37 |
+
streamreader=StreamReader,
|
| 38 |
+
streamwriter=StreamWriter,
|
| 39 |
+
)
|
pllava/lib/python3.10/encodings/iso2022_jp_ext.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# iso2022_jp_ext.py: Python Unicode Codec for ISO2022_JP_EXT
|
| 3 |
+
#
|
| 4 |
+
# Written by Hye-Shik Chang <perky@FreeBSD.org>
|
| 5 |
+
#
|
| 6 |
+
|
| 7 |
+
import _codecs_iso2022, codecs
|
| 8 |
+
import _multibytecodec as mbc
|
| 9 |
+
|
| 10 |
+
codec = _codecs_iso2022.getcodec('iso2022_jp_ext')
|
| 11 |
+
|
| 12 |
+
class Codec(codecs.Codec):
|
| 13 |
+
encode = codec.encode
|
| 14 |
+
decode = codec.decode
|
| 15 |
+
|
| 16 |
+
class IncrementalEncoder(mbc.MultibyteIncrementalEncoder,
|
| 17 |
+
codecs.IncrementalEncoder):
|
| 18 |
+
codec = codec
|
| 19 |
+
|
| 20 |
+
class IncrementalDecoder(mbc.MultibyteIncrementalDecoder,
|
| 21 |
+
codecs.IncrementalDecoder):
|
| 22 |
+
codec = codec
|
| 23 |
+
|
| 24 |
+
class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader):
|
| 25 |
+
codec = codec
|
| 26 |
+
|
| 27 |
+
class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter):
|
| 28 |
+
codec = codec
|
| 29 |
+
|
| 30 |
+
def getregentry():
|
| 31 |
+
return codecs.CodecInfo(
|
| 32 |
+
name='iso2022_jp_ext',
|
| 33 |
+
encode=Codec().encode,
|
| 34 |
+
decode=Codec().decode,
|
| 35 |
+
incrementalencoder=IncrementalEncoder,
|
| 36 |
+
incrementaldecoder=IncrementalDecoder,
|
| 37 |
+
streamreader=StreamReader,
|
| 38 |
+
streamwriter=StreamWriter,
|
| 39 |
+
)
|
pllava/lib/python3.10/encodings/iso8859_10.py
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python Character Mapping Codec iso8859_10 generated from 'MAPPINGS/ISO8859/8859-10.TXT' with gencodec.py.
|
| 2 |
+
|
| 3 |
+
"""#"
|
| 4 |
+
|
| 5 |
+
import codecs
|
| 6 |
+
|
| 7 |
+
### Codec APIs
|
| 8 |
+
|
| 9 |
+
class Codec(codecs.Codec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='iso8859-10',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> NULL
|
| 49 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 50 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 51 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 52 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 53 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 54 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 55 |
+
'\x07' # 0x07 -> BELL
|
| 56 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 57 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 58 |
+
'\n' # 0x0A -> LINE FEED
|
| 59 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 60 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 61 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 62 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 63 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 64 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 65 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 66 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 67 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 68 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 69 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 70 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 71 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 72 |
+
'\x18' # 0x18 -> CANCEL
|
| 73 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 74 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 75 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 76 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 77 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 78 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 79 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> DELETE
|
| 176 |
+
'\x80' # 0x80 -> <control>
|
| 177 |
+
'\x81' # 0x81 -> <control>
|
| 178 |
+
'\x82' # 0x82 -> <control>
|
| 179 |
+
'\x83' # 0x83 -> <control>
|
| 180 |
+
'\x84' # 0x84 -> <control>
|
| 181 |
+
'\x85' # 0x85 -> <control>
|
| 182 |
+
'\x86' # 0x86 -> <control>
|
| 183 |
+
'\x87' # 0x87 -> <control>
|
| 184 |
+
'\x88' # 0x88 -> <control>
|
| 185 |
+
'\x89' # 0x89 -> <control>
|
| 186 |
+
'\x8a' # 0x8A -> <control>
|
| 187 |
+
'\x8b' # 0x8B -> <control>
|
| 188 |
+
'\x8c' # 0x8C -> <control>
|
| 189 |
+
'\x8d' # 0x8D -> <control>
|
| 190 |
+
'\x8e' # 0x8E -> <control>
|
| 191 |
+
'\x8f' # 0x8F -> <control>
|
| 192 |
+
'\x90' # 0x90 -> <control>
|
| 193 |
+
'\x91' # 0x91 -> <control>
|
| 194 |
+
'\x92' # 0x92 -> <control>
|
| 195 |
+
'\x93' # 0x93 -> <control>
|
| 196 |
+
'\x94' # 0x94 -> <control>
|
| 197 |
+
'\x95' # 0x95 -> <control>
|
| 198 |
+
'\x96' # 0x96 -> <control>
|
| 199 |
+
'\x97' # 0x97 -> <control>
|
| 200 |
+
'\x98' # 0x98 -> <control>
|
| 201 |
+
'\x99' # 0x99 -> <control>
|
| 202 |
+
'\x9a' # 0x9A -> <control>
|
| 203 |
+
'\x9b' # 0x9B -> <control>
|
| 204 |
+
'\x9c' # 0x9C -> <control>
|
| 205 |
+
'\x9d' # 0x9D -> <control>
|
| 206 |
+
'\x9e' # 0x9E -> <control>
|
| 207 |
+
'\x9f' # 0x9F -> <control>
|
| 208 |
+
'\xa0' # 0xA0 -> NO-BREAK SPACE
|
| 209 |
+
'\u0104' # 0xA1 -> LATIN CAPITAL LETTER A WITH OGONEK
|
| 210 |
+
'\u0112' # 0xA2 -> LATIN CAPITAL LETTER E WITH MACRON
|
| 211 |
+
'\u0122' # 0xA3 -> LATIN CAPITAL LETTER G WITH CEDILLA
|
| 212 |
+
'\u012a' # 0xA4 -> LATIN CAPITAL LETTER I WITH MACRON
|
| 213 |
+
'\u0128' # 0xA5 -> LATIN CAPITAL LETTER I WITH TILDE
|
| 214 |
+
'\u0136' # 0xA6 -> LATIN CAPITAL LETTER K WITH CEDILLA
|
| 215 |
+
'\xa7' # 0xA7 -> SECTION SIGN
|
| 216 |
+
'\u013b' # 0xA8 -> LATIN CAPITAL LETTER L WITH CEDILLA
|
| 217 |
+
'\u0110' # 0xA9 -> LATIN CAPITAL LETTER D WITH STROKE
|
| 218 |
+
'\u0160' # 0xAA -> LATIN CAPITAL LETTER S WITH CARON
|
| 219 |
+
'\u0166' # 0xAB -> LATIN CAPITAL LETTER T WITH STROKE
|
| 220 |
+
'\u017d' # 0xAC -> LATIN CAPITAL LETTER Z WITH CARON
|
| 221 |
+
'\xad' # 0xAD -> SOFT HYPHEN
|
| 222 |
+
'\u016a' # 0xAE -> LATIN CAPITAL LETTER U WITH MACRON
|
| 223 |
+
'\u014a' # 0xAF -> LATIN CAPITAL LETTER ENG
|
| 224 |
+
'\xb0' # 0xB0 -> DEGREE SIGN
|
| 225 |
+
'\u0105' # 0xB1 -> LATIN SMALL LETTER A WITH OGONEK
|
| 226 |
+
'\u0113' # 0xB2 -> LATIN SMALL LETTER E WITH MACRON
|
| 227 |
+
'\u0123' # 0xB3 -> LATIN SMALL LETTER G WITH CEDILLA
|
| 228 |
+
'\u012b' # 0xB4 -> LATIN SMALL LETTER I WITH MACRON
|
| 229 |
+
'\u0129' # 0xB5 -> LATIN SMALL LETTER I WITH TILDE
|
| 230 |
+
'\u0137' # 0xB6 -> LATIN SMALL LETTER K WITH CEDILLA
|
| 231 |
+
'\xb7' # 0xB7 -> MIDDLE DOT
|
| 232 |
+
'\u013c' # 0xB8 -> LATIN SMALL LETTER L WITH CEDILLA
|
| 233 |
+
'\u0111' # 0xB9 -> LATIN SMALL LETTER D WITH STROKE
|
| 234 |
+
'\u0161' # 0xBA -> LATIN SMALL LETTER S WITH CARON
|
| 235 |
+
'\u0167' # 0xBB -> LATIN SMALL LETTER T WITH STROKE
|
| 236 |
+
'\u017e' # 0xBC -> LATIN SMALL LETTER Z WITH CARON
|
| 237 |
+
'\u2015' # 0xBD -> HORIZONTAL BAR
|
| 238 |
+
'\u016b' # 0xBE -> LATIN SMALL LETTER U WITH MACRON
|
| 239 |
+
'\u014b' # 0xBF -> LATIN SMALL LETTER ENG
|
| 240 |
+
'\u0100' # 0xC0 -> LATIN CAPITAL LETTER A WITH MACRON
|
| 241 |
+
'\xc1' # 0xC1 -> LATIN CAPITAL LETTER A WITH ACUTE
|
| 242 |
+
'\xc2' # 0xC2 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
| 243 |
+
'\xc3' # 0xC3 -> LATIN CAPITAL LETTER A WITH TILDE
|
| 244 |
+
'\xc4' # 0xC4 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 245 |
+
'\xc5' # 0xC5 -> LATIN CAPITAL LETTER A WITH RING ABOVE
|
| 246 |
+
'\xc6' # 0xC6 -> LATIN CAPITAL LETTER AE
|
| 247 |
+
'\u012e' # 0xC7 -> LATIN CAPITAL LETTER I WITH OGONEK
|
| 248 |
+
'\u010c' # 0xC8 -> LATIN CAPITAL LETTER C WITH CARON
|
| 249 |
+
'\xc9' # 0xC9 -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 250 |
+
'\u0118' # 0xCA -> LATIN CAPITAL LETTER E WITH OGONEK
|
| 251 |
+
'\xcb' # 0xCB -> LATIN CAPITAL LETTER E WITH DIAERESIS
|
| 252 |
+
'\u0116' # 0xCC -> LATIN CAPITAL LETTER E WITH DOT ABOVE
|
| 253 |
+
'\xcd' # 0xCD -> LATIN CAPITAL LETTER I WITH ACUTE
|
| 254 |
+
'\xce' # 0xCE -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
| 255 |
+
'\xcf' # 0xCF -> LATIN CAPITAL LETTER I WITH DIAERESIS
|
| 256 |
+
'\xd0' # 0xD0 -> LATIN CAPITAL LETTER ETH (Icelandic)
|
| 257 |
+
'\u0145' # 0xD1 -> LATIN CAPITAL LETTER N WITH CEDILLA
|
| 258 |
+
'\u014c' # 0xD2 -> LATIN CAPITAL LETTER O WITH MACRON
|
| 259 |
+
'\xd3' # 0xD3 -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 260 |
+
'\xd4' # 0xD4 -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
| 261 |
+
'\xd5' # 0xD5 -> LATIN CAPITAL LETTER O WITH TILDE
|
| 262 |
+
'\xd6' # 0xD6 -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 263 |
+
'\u0168' # 0xD7 -> LATIN CAPITAL LETTER U WITH TILDE
|
| 264 |
+
'\xd8' # 0xD8 -> LATIN CAPITAL LETTER O WITH STROKE
|
| 265 |
+
'\u0172' # 0xD9 -> LATIN CAPITAL LETTER U WITH OGONEK
|
| 266 |
+
'\xda' # 0xDA -> LATIN CAPITAL LETTER U WITH ACUTE
|
| 267 |
+
'\xdb' # 0xDB -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
| 268 |
+
'\xdc' # 0xDC -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 269 |
+
'\xdd' # 0xDD -> LATIN CAPITAL LETTER Y WITH ACUTE
|
| 270 |
+
'\xde' # 0xDE -> LATIN CAPITAL LETTER THORN (Icelandic)
|
| 271 |
+
'\xdf' # 0xDF -> LATIN SMALL LETTER SHARP S (German)
|
| 272 |
+
'\u0101' # 0xE0 -> LATIN SMALL LETTER A WITH MACRON
|
| 273 |
+
'\xe1' # 0xE1 -> LATIN SMALL LETTER A WITH ACUTE
|
| 274 |
+
'\xe2' # 0xE2 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
|
| 275 |
+
'\xe3' # 0xE3 -> LATIN SMALL LETTER A WITH TILDE
|
| 276 |
+
'\xe4' # 0xE4 -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 277 |
+
'\xe5' # 0xE5 -> LATIN SMALL LETTER A WITH RING ABOVE
|
| 278 |
+
'\xe6' # 0xE6 -> LATIN SMALL LETTER AE
|
| 279 |
+
'\u012f' # 0xE7 -> LATIN SMALL LETTER I WITH OGONEK
|
| 280 |
+
'\u010d' # 0xE8 -> LATIN SMALL LETTER C WITH CARON
|
| 281 |
+
'\xe9' # 0xE9 -> LATIN SMALL LETTER E WITH ACUTE
|
| 282 |
+
'\u0119' # 0xEA -> LATIN SMALL LETTER E WITH OGONEK
|
| 283 |
+
'\xeb' # 0xEB -> LATIN SMALL LETTER E WITH DIAERESIS
|
| 284 |
+
'\u0117' # 0xEC -> LATIN SMALL LETTER E WITH DOT ABOVE
|
| 285 |
+
'\xed' # 0xED -> LATIN SMALL LETTER I WITH ACUTE
|
| 286 |
+
'\xee' # 0xEE -> LATIN SMALL LETTER I WITH CIRCUMFLEX
|
| 287 |
+
'\xef' # 0xEF -> LATIN SMALL LETTER I WITH DIAERESIS
|
| 288 |
+
'\xf0' # 0xF0 -> LATIN SMALL LETTER ETH (Icelandic)
|
| 289 |
+
'\u0146' # 0xF1 -> LATIN SMALL LETTER N WITH CEDILLA
|
| 290 |
+
'\u014d' # 0xF2 -> LATIN SMALL LETTER O WITH MACRON
|
| 291 |
+
'\xf3' # 0xF3 -> LATIN SMALL LETTER O WITH ACUTE
|
| 292 |
+
'\xf4' # 0xF4 -> LATIN SMALL LETTER O WITH CIRCUMFLEX
|
| 293 |
+
'\xf5' # 0xF5 -> LATIN SMALL LETTER O WITH TILDE
|
| 294 |
+
'\xf6' # 0xF6 -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 295 |
+
'\u0169' # 0xF7 -> LATIN SMALL LETTER U WITH TILDE
|
| 296 |
+
'\xf8' # 0xF8 -> LATIN SMALL LETTER O WITH STROKE
|
| 297 |
+
'\u0173' # 0xF9 -> LATIN SMALL LETTER U WITH OGONEK
|
| 298 |
+
'\xfa' # 0xFA -> LATIN SMALL LETTER U WITH ACUTE
|
| 299 |
+
'\xfb' # 0xFB -> LATIN SMALL LETTER U WITH CIRCUMFLEX
|
| 300 |
+
'\xfc' # 0xFC -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 301 |
+
'\xfd' # 0xFD -> LATIN SMALL LETTER Y WITH ACUTE
|
| 302 |
+
'\xfe' # 0xFE -> LATIN SMALL LETTER THORN (Icelandic)
|
| 303 |
+
'\u0138' # 0xFF -> LATIN SMALL LETTER KRA
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/iso8859_13.py
AD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|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='iso8859-13',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> NULL
|
| 49 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 50 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 51 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 52 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 53 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 54 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 55 |
+
'\x07' # 0x07 -> BELL
|
| 56 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 57 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 58 |
+
'\n' # 0x0A -> LINE FEED
|
| 59 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 60 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 61 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 62 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 63 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 64 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 65 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 66 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 67 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 68 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 69 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 70 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 71 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 72 |
+
'\x18' # 0x18 -> CANCEL
|
| 73 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 74 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 75 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 76 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 77 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 78 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 79 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> DELETE
|
| 176 |
+
'\x80' # 0x80 -> <control>
|
| 177 |
+
'\x81' # 0x81 -> <control>
|
| 178 |
+
'\x82' # 0x82 -> <control>
|
| 179 |
+
'\x83' # 0x83 -> <control>
|
| 180 |
+
'\x84' # 0x84 -> <control>
|
| 181 |
+
'\x85' # 0x85 -> <control>
|
| 182 |
+
'\x86' # 0x86 -> <control>
|
| 183 |
+
'\x87' # 0x87 -> <control>
|
| 184 |
+
'\x88' # 0x88 -> <control>
|
| 185 |
+
'\x89' # 0x89 -> <control>
|
| 186 |
+
'\x8a' # 0x8A -> <control>
|
| 187 |
+
'\x8b' # 0x8B -> <control>
|
| 188 |
+
'\x8c' # 0x8C -> <control>
|
| 189 |
+
'\x8d' # 0x8D -> <control>
|
| 190 |
+
'\x8e' # 0x8E -> <control>
|
| 191 |
+
'\x8f' # 0x8F -> <control>
|
| 192 |
+
'\x90' # 0x90 -> <control>
|
| 193 |
+
'\x91' # 0x91 -> <control>
|
| 194 |
+
'\x92' # 0x92 -> <control>
|
| 195 |
+
'\x93' # 0x93 -> <control>
|
| 196 |
+
'\x94' # 0x94 -> <control>
|
| 197 |
+
'\x95' # 0x95 -> <control>
|
| 198 |
+
'\x96' # 0x96 -> <control>
|
| 199 |
+
'\x97' # 0x97 -> <control>
|
| 200 |
+
'\x98' # 0x98 -> <control>
|
| 201 |
+
'\x99' # 0x99 -> <control>
|
| 202 |
+
'\x9a' # 0x9A -> <control>
|
| 203 |
+
'\x9b' # 0x9B -> <control>
|
| 204 |
+
'\x9c' # 0x9C -> <control>
|
| 205 |
+
'\x9d' # 0x9D -> <control>
|
| 206 |
+
'\x9e' # 0x9E -> <control>
|
| 207 |
+
'\x9f' # 0x9F -> <control>
|
| 208 |
+
'\xa0' # 0xA0 -> NO-BREAK SPACE
|
| 209 |
+
'\u201d' # 0xA1 -> RIGHT DOUBLE QUOTATION MARK
|
| 210 |
+
'\xa2' # 0xA2 -> CENT SIGN
|
| 211 |
+
'\xa3' # 0xA3 -> POUND SIGN
|
| 212 |
+
'\xa4' # 0xA4 -> CURRENCY SIGN
|
| 213 |
+
'\u201e' # 0xA5 -> DOUBLE LOW-9 QUOTATION MARK
|
| 214 |
+
'\xa6' # 0xA6 -> BROKEN BAR
|
| 215 |
+
'\xa7' # 0xA7 -> SECTION SIGN
|
| 216 |
+
'\xd8' # 0xA8 -> LATIN CAPITAL LETTER O WITH STROKE
|
| 217 |
+
'\xa9' # 0xA9 -> COPYRIGHT SIGN
|
| 218 |
+
'\u0156' # 0xAA -> LATIN CAPITAL LETTER R WITH CEDILLA
|
| 219 |
+
'\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 220 |
+
'\xac' # 0xAC -> NOT SIGN
|
| 221 |
+
'\xad' # 0xAD -> SOFT HYPHEN
|
| 222 |
+
'\xae' # 0xAE -> REGISTERED SIGN
|
| 223 |
+
'\xc6' # 0xAF -> LATIN CAPITAL LETTER AE
|
| 224 |
+
'\xb0' # 0xB0 -> DEGREE SIGN
|
| 225 |
+
'\xb1' # 0xB1 -> PLUS-MINUS SIGN
|
| 226 |
+
'\xb2' # 0xB2 -> SUPERSCRIPT TWO
|
| 227 |
+
'\xb3' # 0xB3 -> SUPERSCRIPT THREE
|
| 228 |
+
'\u201c' # 0xB4 -> LEFT DOUBLE QUOTATION MARK
|
| 229 |
+
'\xb5' # 0xB5 -> MICRO SIGN
|
| 230 |
+
'\xb6' # 0xB6 -> PILCROW SIGN
|
| 231 |
+
'\xb7' # 0xB7 -> MIDDLE DOT
|
| 232 |
+
'\xf8' # 0xB8 -> LATIN SMALL LETTER O WITH STROKE
|
| 233 |
+
'\xb9' # 0xB9 -> SUPERSCRIPT ONE
|
| 234 |
+
'\u0157' # 0xBA -> LATIN SMALL LETTER R WITH CEDILLA
|
| 235 |
+
'\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 236 |
+
'\xbc' # 0xBC -> VULGAR FRACTION ONE QUARTER
|
| 237 |
+
'\xbd' # 0xBD -> VULGAR FRACTION ONE HALF
|
| 238 |
+
'\xbe' # 0xBE -> VULGAR FRACTION THREE QUARTERS
|
| 239 |
+
'\xe6' # 0xBF -> LATIN SMALL LETTER AE
|
| 240 |
+
'\u0104' # 0xC0 -> LATIN CAPITAL LETTER A WITH OGONEK
|
| 241 |
+
'\u012e' # 0xC1 -> LATIN CAPITAL LETTER I WITH OGONEK
|
| 242 |
+
'\u0100' # 0xC2 -> LATIN CAPITAL LETTER A WITH MACRON
|
| 243 |
+
'\u0106' # 0xC3 -> LATIN CAPITAL LETTER C WITH ACUTE
|
| 244 |
+
'\xc4' # 0xC4 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 245 |
+
'\xc5' # 0xC5 -> LATIN CAPITAL LETTER A WITH RING ABOVE
|
| 246 |
+
'\u0118' # 0xC6 -> LATIN CAPITAL LETTER E WITH OGONEK
|
| 247 |
+
'\u0112' # 0xC7 -> LATIN CAPITAL LETTER E WITH MACRON
|
| 248 |
+
'\u010c' # 0xC8 -> LATIN CAPITAL LETTER C WITH CARON
|
| 249 |
+
'\xc9' # 0xC9 -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 250 |
+
'\u0179' # 0xCA -> LATIN CAPITAL LETTER Z WITH ACUTE
|
| 251 |
+
'\u0116' # 0xCB -> LATIN CAPITAL LETTER E WITH DOT ABOVE
|
| 252 |
+
'\u0122' # 0xCC -> LATIN CAPITAL LETTER G WITH CEDILLA
|
| 253 |
+
'\u0136' # 0xCD -> LATIN CAPITAL LETTER K WITH CEDILLA
|
| 254 |
+
'\u012a' # 0xCE -> LATIN CAPITAL LETTER I WITH MACRON
|
| 255 |
+
'\u013b' # 0xCF -> LATIN CAPITAL LETTER L WITH CEDILLA
|
| 256 |
+
'\u0160' # 0xD0 -> LATIN CAPITAL LETTER S WITH CARON
|
| 257 |
+
'\u0143' # 0xD1 -> LATIN CAPITAL LETTER N WITH ACUTE
|
| 258 |
+
'\u0145' # 0xD2 -> LATIN CAPITAL LETTER N WITH CEDILLA
|
| 259 |
+
'\xd3' # 0xD3 -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 260 |
+
'\u014c' # 0xD4 -> LATIN CAPITAL LETTER O WITH MACRON
|
| 261 |
+
'\xd5' # 0xD5 -> LATIN CAPITAL LETTER O WITH TILDE
|
| 262 |
+
'\xd6' # 0xD6 -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 263 |
+
'\xd7' # 0xD7 -> MULTIPLICATION SIGN
|
| 264 |
+
'\u0172' # 0xD8 -> LATIN CAPITAL LETTER U WITH OGONEK
|
| 265 |
+
'\u0141' # 0xD9 -> LATIN CAPITAL LETTER L WITH STROKE
|
| 266 |
+
'\u015a' # 0xDA -> LATIN CAPITAL LETTER S WITH ACUTE
|
| 267 |
+
'\u016a' # 0xDB -> LATIN CAPITAL LETTER U WITH MACRON
|
| 268 |
+
'\xdc' # 0xDC -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 269 |
+
'\u017b' # 0xDD -> LATIN CAPITAL LETTER Z WITH DOT ABOVE
|
| 270 |
+
'\u017d' # 0xDE -> LATIN CAPITAL LETTER Z WITH CARON
|
| 271 |
+
'\xdf' # 0xDF -> LATIN SMALL LETTER SHARP S (German)
|
| 272 |
+
'\u0105' # 0xE0 -> LATIN SMALL LETTER A WITH OGONEK
|
| 273 |
+
'\u012f' # 0xE1 -> LATIN SMALL LETTER I WITH OGONEK
|
| 274 |
+
'\u0101' # 0xE2 -> LATIN SMALL LETTER A WITH MACRON
|
| 275 |
+
'\u0107' # 0xE3 -> LATIN SMALL LETTER C WITH ACUTE
|
| 276 |
+
'\xe4' # 0xE4 -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 277 |
+
'\xe5' # 0xE5 -> LATIN SMALL LETTER A WITH RING ABOVE
|
| 278 |
+
'\u0119' # 0xE6 -> LATIN SMALL LETTER E WITH OGONEK
|
| 279 |
+
'\u0113' # 0xE7 -> LATIN SMALL LETTER E WITH MACRON
|
| 280 |
+
'\u010d' # 0xE8 -> LATIN SMALL LETTER C WITH CARON
|
| 281 |
+
'\xe9' # 0xE9 -> LATIN SMALL LETTER E WITH ACUTE
|
| 282 |
+
'\u017a' # 0xEA -> LATIN SMALL LETTER Z WITH ACUTE
|
| 283 |
+
'\u0117' # 0xEB -> LATIN SMALL LETTER E WITH DOT ABOVE
|
| 284 |
+
'\u0123' # 0xEC -> LATIN SMALL LETTER G WITH CEDILLA
|
| 285 |
+
'\u0137' # 0xED -> LATIN SMALL LETTER K WITH CEDILLA
|
| 286 |
+
'\u012b' # 0xEE -> LATIN SMALL LETTER I WITH MACRON
|
| 287 |
+
'\u013c' # 0xEF -> LATIN SMALL LETTER L WITH CEDILLA
|
| 288 |
+
'\u0161' # 0xF0 -> LATIN SMALL LETTER S WITH CARON
|
| 289 |
+
'\u0144' # 0xF1 -> LATIN SMALL LETTER N WITH ACUTE
|
| 290 |
+
'\u0146' # 0xF2 -> LATIN SMALL LETTER N WITH CEDILLA
|
| 291 |
+
'\xf3' # 0xF3 -> LATIN SMALL LETTER O WITH ACUTE
|
| 292 |
+
'\u014d' # 0xF4 -> LATIN SMALL LETTER O WITH MACRON
|
| 293 |
+
'\xf5' # 0xF5 -> LATIN SMALL LETTER O WITH TILDE
|
| 294 |
+
'\xf6' # 0xF6 -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 295 |
+
'\xf7' # 0xF7 -> DIVISION SIGN
|
| 296 |
+
'\u0173' # 0xF8 -> LATIN SMALL LETTER U WITH OGONEK
|
| 297 |
+
'\u0142' # 0xF9 -> LATIN SMALL LETTER L WITH STROKE
|
| 298 |
+
'\u015b' # 0xFA -> LATIN SMALL LETTER S WITH ACUTE
|
| 299 |
+
'\u016b' # 0xFB -> LATIN SMALL LETTER U WITH MACRON
|
| 300 |
+
'\xfc' # 0xFC -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 301 |
+
'\u017c' # 0xFD -> LATIN SMALL LETTER Z WITH DOT ABOVE
|
| 302 |
+
'\u017e'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 |
+
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.TXT' with gencodec.py.
|
| 2 |
+
|
| 3 |
+
"""#"
|
| 4 |
+
|
| 5 |
+
import codecs
|
| 6 |
+
|
| 7 |
+
### Codec APIs
|
| 8 |
+
|
| 9 |
+
class Codec(codecs.Codec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='iso8859-3',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> NULL
|
| 49 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 50 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 51 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 52 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 53 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 54 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 55 |
+
'\x07' # 0x07 -> BELL
|
| 56 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 57 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 58 |
+
'\n' # 0x0A -> LINE FEED
|
| 59 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 60 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 61 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 62 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 63 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 64 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 65 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 66 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 67 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 68 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 69 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 70 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 71 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 72 |
+
'\x18' # 0x18 -> CANCEL
|
| 73 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 74 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 75 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 76 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 77 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 78 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 79 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> DELETE
|
| 176 |
+
'\x80' # 0x80 -> <control>
|
| 177 |
+
'\x81' # 0x81 -> <control>
|
| 178 |
+
'\x82' # 0x82 -> <control>
|
| 179 |
+
'\x83' # 0x83 -> <control>
|
| 180 |
+
'\x84' # 0x84 -> <control>
|
| 181 |
+
'\x85' # 0x85 -> <control>
|
| 182 |
+
'\x86' # 0x86 -> <control>
|
| 183 |
+
'\x87' # 0x87 -> <control>
|
| 184 |
+
'\x88' # 0x88 -> <control>
|
| 185 |
+
'\x89' # 0x89 -> <control>
|
| 186 |
+
'\x8a' # 0x8A -> <control>
|
| 187 |
+
'\x8b' # 0x8B -> <control>
|
| 188 |
+
'\x8c' # 0x8C -> <control>
|
| 189 |
+
'\x8d' # 0x8D -> <control>
|
| 190 |
+
'\x8e' # 0x8E -> <control>
|
| 191 |
+
'\x8f' # 0x8F -> <control>
|
| 192 |
+
'\x90' # 0x90 -> <control>
|
| 193 |
+
'\x91' # 0x91 -> <control>
|
| 194 |
+
'\x92' # 0x92 -> <control>
|
| 195 |
+
'\x93' # 0x93 -> <control>
|
| 196 |
+
'\x94' # 0x94 -> <control>
|
| 197 |
+
'\x95' # 0x95 -> <control>
|
| 198 |
+
'\x96' # 0x96 -> <control>
|
| 199 |
+
'\x97' # 0x97 -> <control>
|
| 200 |
+
'\x98' # 0x98 -> <control>
|
| 201 |
+
'\x99' # 0x99 -> <control>
|
| 202 |
+
'\x9a' # 0x9A -> <control>
|
| 203 |
+
'\x9b' # 0x9B -> <control>
|
| 204 |
+
'\x9c' # 0x9C -> <control>
|
| 205 |
+
'\x9d' # 0x9D -> <control>
|
| 206 |
+
'\x9e' # 0x9E -> <control>
|
| 207 |
+
'\x9f' # 0x9F -> <control>
|
| 208 |
+
'\xa0' # 0xA0 -> NO-BREAK SPACE
|
| 209 |
+
'\u0126' # 0xA1 -> LATIN CAPITAL LETTER H WITH STROKE
|
| 210 |
+
'\u02d8' # 0xA2 -> BREVE
|
| 211 |
+
'\xa3' # 0xA3 -> POUND SIGN
|
| 212 |
+
'\xa4' # 0xA4 -> CURRENCY SIGN
|
| 213 |
+
'\ufffe'
|
| 214 |
+
'\u0124' # 0xA6 -> LATIN CAPITAL LETTER H WITH CIRCUMFLEX
|
| 215 |
+
'\xa7' # 0xA7 -> SECTION SIGN
|
| 216 |
+
'\xa8' # 0xA8 -> DIAERESIS
|
| 217 |
+
'\u0130' # 0xA9 -> LATIN CAPITAL LETTER I WITH DOT ABOVE
|
| 218 |
+
'\u015e' # 0xAA -> LATIN CAPITAL LETTER S WITH CEDILLA
|
| 219 |
+
'\u011e' # 0xAB -> LATIN CAPITAL LETTER G WITH BREVE
|
| 220 |
+
'\u0134' # 0xAC -> LATIN CAPITAL LETTER J WITH CIRCUMFLEX
|
| 221 |
+
'\xad' # 0xAD -> SOFT HYPHEN
|
| 222 |
+
'\ufffe'
|
| 223 |
+
'\u017b' # 0xAF -> LATIN CAPITAL LETTER Z WITH DOT ABOVE
|
| 224 |
+
'\xb0' # 0xB0 -> DEGREE SIGN
|
| 225 |
+
'\u0127' # 0xB1 -> LATIN SMALL LETTER H WITH STROKE
|
| 226 |
+
'\xb2' # 0xB2 -> SUPERSCRIPT TWO
|
| 227 |
+
'\xb3' # 0xB3 -> SUPERSCRIPT THREE
|
| 228 |
+
'\xb4' # 0xB4 -> ACUTE ACCENT
|
| 229 |
+
'\xb5' # 0xB5 -> MICRO SIGN
|
| 230 |
+
'\u0125' # 0xB6 -> LATIN SMALL LETTER H WITH CIRCUMFLEX
|
| 231 |
+
'\xb7' # 0xB7 -> MIDDLE DOT
|
| 232 |
+
'\xb8' # 0xB8 -> CEDILLA
|
| 233 |
+
'\u0131' # 0xB9 -> LATIN SMALL LETTER DOTLESS I
|
| 234 |
+
'\u015f' # 0xBA -> LATIN SMALL LETTER S WITH CEDILLA
|
| 235 |
+
'\u011f' # 0xBB -> LATIN SMALL LETTER G WITH BREVE
|
| 236 |
+
'\u0135' # 0xBC -> LATIN SMALL LETTER J WITH CIRCUMFLEX
|
| 237 |
+
'\xbd' # 0xBD -> VULGAR FRACTION ONE HALF
|
| 238 |
+
'\ufffe'
|
| 239 |
+
'\u017c' # 0xBF -> LATIN SMALL LETTER Z WITH DOT ABOVE
|
| 240 |
+
'\xc0' # 0xC0 -> LATIN CAPITAL LETTER A WITH GRAVE
|
| 241 |
+
'\xc1' # 0xC1 -> LATIN CAPITAL LETTER A WITH ACUTE
|
| 242 |
+
'\xc2' # 0xC2 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
| 243 |
+
'\ufffe'
|
| 244 |
+
'\xc4' # 0xC4 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 245 |
+
'\u010a' # 0xC5 -> LATIN CAPITAL LETTER C WITH DOT ABOVE
|
| 246 |
+
'\u0108' # 0xC6 -> LATIN CAPITAL LETTER C WITH CIRCUMFLEX
|
| 247 |
+
'\xc7' # 0xC7 -> LATIN CAPITAL LETTER C WITH CEDILLA
|
| 248 |
+
'\xc8' # 0xC8 -> LATIN CAPITAL LETTER E WITH GRAVE
|
| 249 |
+
'\xc9' # 0xC9 -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 250 |
+
'\xca' # 0xCA -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
| 251 |
+
'\xcb' # 0xCB -> LATIN CAPITAL LETTER E WITH DIAERESIS
|
| 252 |
+
'\xcc' # 0xCC -> LATIN CAPITAL LETTER I WITH GRAVE
|
| 253 |
+
'\xcd' # 0xCD -> LATIN CAPITAL LETTER I WITH ACUTE
|
| 254 |
+
'\xce' # 0xCE -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
| 255 |
+
'\xcf' # 0xCF -> LATIN CAPITAL LETTER I WITH DIAERESIS
|
| 256 |
+
'\ufffe'
|
| 257 |
+
'\xd1' # 0xD1 -> LATIN CAPITAL LETTER N WITH TILDE
|
| 258 |
+
'\xd2' # 0xD2 -> LATIN CAPITAL LETTER O WITH GRAVE
|
| 259 |
+
'\xd3' # 0xD3 -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 260 |
+
'\xd4' # 0xD4 -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
| 261 |
+
'\u0120' # 0xD5 -> LATIN CAPITAL LETTER G WITH DOT ABOVE
|
| 262 |
+
'\xd6' # 0xD6 -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 263 |
+
'\xd7' # 0xD7 -> MULTIPLICATION SIGN
|
| 264 |
+
'\u011c' # 0xD8 -> LATIN CAPITAL LETTER G WITH CIRCUMFLEX
|
| 265 |
+
'\xd9' # 0xD9 -> LATIN CAPITAL LETTER U WITH GRAVE
|
| 266 |
+
'\xda' # 0xDA -> LATIN CAPITAL LETTER U WITH ACUTE
|
| 267 |
+
'\xdb' # 0xDB -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
| 268 |
+
'\xdc' # 0xDC -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 269 |
+
'\u016c' # 0xDD -> LATIN CAPITAL LETTER U WITH BREVE
|
| 270 |
+
'\u015c' # 0xDE -> LATIN CAPITAL LETTER S WITH CIRCUMFLEX
|
| 271 |
+
'\xdf' # 0xDF -> LATIN SMALL LETTER SHARP S
|
| 272 |
+
'\xe0' # 0xE0 -> LATIN SMALL LETTER A WITH GRAVE
|
| 273 |
+
'\xe1' # 0xE1 -> LATIN SMALL LETTER A WITH ACUTE
|
| 274 |
+
'\xe2' # 0xE2 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
|
| 275 |
+
'\ufffe'
|
| 276 |
+
'\xe4' # 0xE4 -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 277 |
+
'\u010b' # 0xE5 -> LATIN SMALL LETTER C WITH DOT ABOVE
|
| 278 |
+
'\u0109' # 0xE6 -> LATIN SMALL LETTER C WITH CIRCUMFLEX
|
| 279 |
+
'\xe7' # 0xE7 -> LATIN SMALL LETTER C WITH CEDILLA
|
| 280 |
+
'\xe8' # 0xE8 -> LATIN SMALL LETTER E WITH GRAVE
|
| 281 |
+
'\xe9' # 0xE9 -> LATIN SMALL LETTER E WITH ACUTE
|
| 282 |
+
'\xea' # 0xEA -> LATIN SMALL LETTER E WITH CIRCUMFLEX
|
| 283 |
+
'\xeb' # 0xEB -> LATIN SMALL LETTER E WITH DIAERESIS
|
| 284 |
+
'\xec' # 0xEC -> LATIN SMALL LETTER I WITH GRAVE
|
| 285 |
+
'\xed' # 0xED -> LATIN SMALL LETTER I WITH ACUTE
|
| 286 |
+
'\xee' # 0xEE -> LATIN SMALL LETTER I WITH CIRCUMFLEX
|
| 287 |
+
'\xef' # 0xEF -> LATIN SMALL LETTER I WITH DIAERESIS
|
| 288 |
+
'\ufffe'
|
| 289 |
+
'\xf1' # 0xF1 -> LATIN SMALL LETTER N WITH TILDE
|
| 290 |
+
'\xf2' # 0xF2 -> LATIN SMALL LETTER O WITH GRAVE
|
| 291 |
+
'\xf3' # 0xF3 -> LATIN SMALL LETTER O WITH ACUTE
|
| 292 |
+
'\xf4' # 0xF4 -> LATIN SMALL LETTER O WITH CIRCUMFLEX
|
| 293 |
+
'\u0121' # 0xF5 -> LATIN SMALL LETTER G WITH DOT ABOVE
|
| 294 |
+
'\xf6' # 0xF6 -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 295 |
+
'\xf7' # 0xF7 -> DIVISION SIGN
|
| 296 |
+
'\u011d' # 0xF8 -> LATIN SMALL LETTER G WITH CIRCUMFLEX
|
| 297 |
+
'\xf9' # 0xF9 -> LATIN SMALL LETTER U WITH GRAVE
|
| 298 |
+
'\xfa' # 0xFA -> LATIN SMALL LETTER U WITH ACUTE
|
| 299 |
+
'\xfb' # 0xFB -> LATIN SMALL LETTER U WITH CIRCUMFLEX
|
| 300 |
+
'\xfc' # 0xFC -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 301 |
+
'\u016d' # 0xFD -> LATIN SMALL LETTER U WITH BREVE
|
| 302 |
+
'\u015d' # 0xFE -> LATIN SMALL LETTER S WITH CIRCUMFLEX
|
| 303 |
+
'\u02d9' # 0xFF -> DOT ABOVE
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/iso8859_8.py
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python Character Mapping Codec iso8859_8 generated from 'MAPPINGS/ISO8859/8859-8.TXT' with gencodec.py.
|
| 2 |
+
|
| 3 |
+
"""#"
|
| 4 |
+
|
| 5 |
+
import codecs
|
| 6 |
+
|
| 7 |
+
### Codec APIs
|
| 8 |
+
|
| 9 |
+
class Codec(codecs.Codec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='iso8859-8',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> NULL
|
| 49 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 50 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 51 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 52 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 53 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 54 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 55 |
+
'\x07' # 0x07 -> BELL
|
| 56 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 57 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 58 |
+
'\n' # 0x0A -> LINE FEED
|
| 59 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 60 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 61 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 62 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 63 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 64 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 65 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 66 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 67 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 68 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 69 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 70 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 71 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 72 |
+
'\x18' # 0x18 -> CANCEL
|
| 73 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 74 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 75 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 76 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 77 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 78 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 79 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> DELETE
|
| 176 |
+
'\x80' # 0x80 -> <control>
|
| 177 |
+
'\x81' # 0x81 -> <control>
|
| 178 |
+
'\x82' # 0x82 -> <control>
|
| 179 |
+
'\x83' # 0x83 -> <control>
|
| 180 |
+
'\x84' # 0x84 -> <control>
|
| 181 |
+
'\x85' # 0x85 -> <control>
|
| 182 |
+
'\x86' # 0x86 -> <control>
|
| 183 |
+
'\x87' # 0x87 -> <control>
|
| 184 |
+
'\x88' # 0x88 -> <control>
|
| 185 |
+
'\x89' # 0x89 -> <control>
|
| 186 |
+
'\x8a' # 0x8A -> <control>
|
| 187 |
+
'\x8b' # 0x8B -> <control>
|
| 188 |
+
'\x8c' # 0x8C -> <control>
|
| 189 |
+
'\x8d' # 0x8D -> <control>
|
| 190 |
+
'\x8e' # 0x8E -> <control>
|
| 191 |
+
'\x8f' # 0x8F -> <control>
|
| 192 |
+
'\x90' # 0x90 -> <control>
|
| 193 |
+
'\x91' # 0x91 -> <control>
|
| 194 |
+
'\x92' # 0x92 -> <control>
|
| 195 |
+
'\x93' # 0x93 -> <control>
|
| 196 |
+
'\x94' # 0x94 -> <control>
|
| 197 |
+
'\x95' # 0x95 -> <control>
|
| 198 |
+
'\x96' # 0x96 -> <control>
|
| 199 |
+
'\x97' # 0x97 -> <control>
|
| 200 |
+
'\x98' # 0x98 -> <control>
|
| 201 |
+
'\x99' # 0x99 -> <control>
|
| 202 |
+
'\x9a' # 0x9A -> <control>
|
| 203 |
+
'\x9b' # 0x9B -> <control>
|
| 204 |
+
'\x9c' # 0x9C -> <control>
|
| 205 |
+
'\x9d' # 0x9D -> <control>
|
| 206 |
+
'\x9e' # 0x9E -> <control>
|
| 207 |
+
'\x9f' # 0x9F -> <control>
|
| 208 |
+
'\xa0' # 0xA0 -> NO-BREAK SPACE
|
| 209 |
+
'\ufffe'
|
| 210 |
+
'\xa2' # 0xA2 -> CENT SIGN
|
| 211 |
+
'\xa3' # 0xA3 -> POUND SIGN
|
| 212 |
+
'\xa4' # 0xA4 -> CURRENCY SIGN
|
| 213 |
+
'\xa5' # 0xA5 -> YEN SIGN
|
| 214 |
+
'\xa6' # 0xA6 -> BROKEN BAR
|
| 215 |
+
'\xa7' # 0xA7 -> SECTION SIGN
|
| 216 |
+
'\xa8' # 0xA8 -> DIAERESIS
|
| 217 |
+
'\xa9' # 0xA9 -> COPYRIGHT SIGN
|
| 218 |
+
'\xd7' # 0xAA -> MULTIPLICATION SIGN
|
| 219 |
+
'\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 220 |
+
'\xac' # 0xAC -> NOT SIGN
|
| 221 |
+
'\xad' # 0xAD -> SOFT HYPHEN
|
| 222 |
+
'\xae' # 0xAE -> REGISTERED SIGN
|
| 223 |
+
'\xaf' # 0xAF -> MACRON
|
| 224 |
+
'\xb0' # 0xB0 -> DEGREE SIGN
|
| 225 |
+
'\xb1' # 0xB1 -> PLUS-MINUS SIGN
|
| 226 |
+
'\xb2' # 0xB2 -> SUPERSCRIPT TWO
|
| 227 |
+
'\xb3' # 0xB3 -> SUPERSCRIPT THREE
|
| 228 |
+
'\xb4' # 0xB4 -> ACUTE ACCENT
|
| 229 |
+
'\xb5' # 0xB5 -> MICRO SIGN
|
| 230 |
+
'\xb6' # 0xB6 -> PILCROW SIGN
|
| 231 |
+
'\xb7' # 0xB7 -> MIDDLE DOT
|
| 232 |
+
'\xb8' # 0xB8 -> CEDILLA
|
| 233 |
+
'\xb9' # 0xB9 -> SUPERSCRIPT ONE
|
| 234 |
+
'\xf7' # 0xBA -> DIVISION SIGN
|
| 235 |
+
'\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 236 |
+
'\xbc' # 0xBC -> VULGAR FRACTION ONE QUARTER
|
| 237 |
+
'\xbd' # 0xBD -> VULGAR FRACTION ONE HALF
|
| 238 |
+
'\xbe' # 0xBE -> VULGAR FRACTION THREE QUARTERS
|
| 239 |
+
'\ufffe'
|
| 240 |
+
'\ufffe'
|
| 241 |
+
'\ufffe'
|
| 242 |
+
'\ufffe'
|
| 243 |
+
'\ufffe'
|
| 244 |
+
'\ufffe'
|
| 245 |
+
'\ufffe'
|
| 246 |
+
'\ufffe'
|
| 247 |
+
'\ufffe'
|
| 248 |
+
'\ufffe'
|
| 249 |
+
'\ufffe'
|
| 250 |
+
'\ufffe'
|
| 251 |
+
'\ufffe'
|
| 252 |
+
'\ufffe'
|
| 253 |
+
'\ufffe'
|
| 254 |
+
'\ufffe'
|
| 255 |
+
'\ufffe'
|
| 256 |
+
'\ufffe'
|
| 257 |
+
'\ufffe'
|
| 258 |
+
'\ufffe'
|
| 259 |
+
'\ufffe'
|
| 260 |
+
'\ufffe'
|
| 261 |
+
'\ufffe'
|
| 262 |
+
'\ufffe'
|
| 263 |
+
'\ufffe'
|
| 264 |
+
'\ufffe'
|
| 265 |
+
'\ufffe'
|
| 266 |
+
'\ufffe'
|
| 267 |
+
'\ufffe'
|
| 268 |
+
'\ufffe'
|
| 269 |
+
'\ufffe'
|
| 270 |
+
'\ufffe'
|
| 271 |
+
'\u2017' # 0xDF -> DOUBLE LOW LINE
|
| 272 |
+
'\u05d0' # 0xE0 -> HEBREW LETTER ALEF
|
| 273 |
+
'\u05d1' # 0xE1 -> HEBREW LETTER BET
|
| 274 |
+
'\u05d2' # 0xE2 -> HEBREW LETTER GIMEL
|
| 275 |
+
'\u05d3' # 0xE3 -> HEBREW LETTER DALET
|
| 276 |
+
'\u05d4' # 0xE4 -> HEBREW LETTER HE
|
| 277 |
+
'\u05d5' # 0xE5 -> HEBREW LETTER VAV
|
| 278 |
+
'\u05d6' # 0xE6 -> HEBREW LETTER ZAYIN
|
| 279 |
+
'\u05d7' # 0xE7 -> HEBREW LETTER HET
|
| 280 |
+
'\u05d8' # 0xE8 -> HEBREW LETTER TET
|
| 281 |
+
'\u05d9' # 0xE9 -> HEBREW LETTER YOD
|
| 282 |
+
'\u05da' # 0xEA -> HEBREW LETTER FINAL KAF
|
| 283 |
+
'\u05db' # 0xEB -> HEBREW LETTER KAF
|
| 284 |
+
'\u05dc' # 0xEC -> HEBREW LETTER LAMED
|
| 285 |
+
'\u05dd' # 0xED -> HEBREW LETTER FINAL MEM
|
| 286 |
+
'\u05de' # 0xEE -> HEBREW LETTER MEM
|
| 287 |
+
'\u05df' # 0xEF -> HEBREW LETTER FINAL NUN
|
| 288 |
+
'\u05e0' # 0xF0 -> HEBREW LETTER NUN
|
| 289 |
+
'\u05e1' # 0xF1 -> HEBREW LETTER SAMEKH
|
| 290 |
+
'\u05e2' # 0xF2 -> HEBREW LETTER AYIN
|
| 291 |
+
'\u05e3' # 0xF3 -> HEBREW LETTER FINAL PE
|
| 292 |
+
'\u05e4' # 0xF4 -> HEBREW LETTER PE
|
| 293 |
+
'\u05e5' # 0xF5 -> HEBREW LETTER FINAL TSADI
|
| 294 |
+
'\u05e6' # 0xF6 -> HEBREW LETTER TSADI
|
| 295 |
+
'\u05e7' # 0xF7 -> HEBREW LETTER QOF
|
| 296 |
+
'\u05e8' # 0xF8 -> HEBREW LETTER RESH
|
| 297 |
+
'\u05e9' # 0xF9 -> HEBREW LETTER SHIN
|
| 298 |
+
'\u05ea' # 0xFA -> HEBREW LETTER TAV
|
| 299 |
+
'\ufffe'
|
| 300 |
+
'\ufffe'
|
| 301 |
+
'\u200e' # 0xFD -> LEFT-TO-RIGHT MARK
|
| 302 |
+
'\u200f' # 0xFE -> RIGHT-TO-LEFT MARK
|
| 303 |
+
'\ufffe'
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/latin_1.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python 'latin-1' Codec
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
Written by Marc-Andre Lemburg (mal@lemburg.com).
|
| 5 |
+
|
| 6 |
+
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
|
| 7 |
+
|
| 8 |
+
"""
|
| 9 |
+
import codecs
|
| 10 |
+
|
| 11 |
+
### Codec APIs
|
| 12 |
+
|
| 13 |
+
class Codec(codecs.Codec):
|
| 14 |
+
|
| 15 |
+
# Note: Binding these as C functions will result in the class not
|
| 16 |
+
# converting them to methods. This is intended.
|
| 17 |
+
encode = codecs.latin_1_encode
|
| 18 |
+
decode = codecs.latin_1_decode
|
| 19 |
+
|
| 20 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 21 |
+
def encode(self, input, final=False):
|
| 22 |
+
return codecs.latin_1_encode(input,self.errors)[0]
|
| 23 |
+
|
| 24 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 25 |
+
def decode(self, input, final=False):
|
| 26 |
+
return codecs.latin_1_decode(input,self.errors)[0]
|
| 27 |
+
|
| 28 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 32 |
+
pass
|
| 33 |
+
|
| 34 |
+
class StreamConverter(StreamWriter,StreamReader):
|
| 35 |
+
|
| 36 |
+
encode = codecs.latin_1_decode
|
| 37 |
+
decode = codecs.latin_1_encode
|
| 38 |
+
|
| 39 |
+
### encodings module API
|
| 40 |
+
|
| 41 |
+
def getregentry():
|
| 42 |
+
return codecs.CodecInfo(
|
| 43 |
+
name='iso8859-1',
|
| 44 |
+
encode=Codec.encode,
|
| 45 |
+
decode=Codec.decode,
|
| 46 |
+
incrementalencoder=IncrementalEncoder,
|
| 47 |
+
incrementaldecoder=IncrementalDecoder,
|
| 48 |
+
streamreader=StreamReader,
|
| 49 |
+
streamwriter=StreamWriter,
|
| 50 |
+
)
|
pllava/lib/python3.10/encodings/mac_croatian.py
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python Character Mapping Codec mac_croatian generated from 'MAPPINGS/VENDORS/APPLE/CROATIAN.TXT' with gencodec.py.
|
| 2 |
+
|
| 3 |
+
"""#"
|
| 4 |
+
|
| 5 |
+
import codecs
|
| 6 |
+
|
| 7 |
+
### Codec APIs
|
| 8 |
+
|
| 9 |
+
class Codec(codecs.Codec):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='mac-croatian',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> CONTROL CHARACTER
|
| 49 |
+
'\x01' # 0x01 -> CONTROL CHARACTER
|
| 50 |
+
'\x02' # 0x02 -> CONTROL CHARACTER
|
| 51 |
+
'\x03' # 0x03 -> CONTROL CHARACTER
|
| 52 |
+
'\x04' # 0x04 -> CONTROL CHARACTER
|
| 53 |
+
'\x05' # 0x05 -> CONTROL CHARACTER
|
| 54 |
+
'\x06' # 0x06 -> CONTROL CHARACTER
|
| 55 |
+
'\x07' # 0x07 -> CONTROL CHARACTER
|
| 56 |
+
'\x08' # 0x08 -> CONTROL CHARACTER
|
| 57 |
+
'\t' # 0x09 -> CONTROL CHARACTER
|
| 58 |
+
'\n' # 0x0A -> CONTROL CHARACTER
|
| 59 |
+
'\x0b' # 0x0B -> CONTROL CHARACTER
|
| 60 |
+
'\x0c' # 0x0C -> CONTROL CHARACTER
|
| 61 |
+
'\r' # 0x0D -> CONTROL CHARACTER
|
| 62 |
+
'\x0e' # 0x0E -> CONTROL CHARACTER
|
| 63 |
+
'\x0f' # 0x0F -> CONTROL CHARACTER
|
| 64 |
+
'\x10' # 0x10 -> CONTROL CHARACTER
|
| 65 |
+
'\x11' # 0x11 -> CONTROL CHARACTER
|
| 66 |
+
'\x12' # 0x12 -> CONTROL CHARACTER
|
| 67 |
+
'\x13' # 0x13 -> CONTROL CHARACTER
|
| 68 |
+
'\x14' # 0x14 -> CONTROL CHARACTER
|
| 69 |
+
'\x15' # 0x15 -> CONTROL CHARACTER
|
| 70 |
+
'\x16' # 0x16 -> CONTROL CHARACTER
|
| 71 |
+
'\x17' # 0x17 -> CONTROL CHARACTER
|
| 72 |
+
'\x18' # 0x18 -> CONTROL CHARACTER
|
| 73 |
+
'\x19' # 0x19 -> CONTROL CHARACTER
|
| 74 |
+
'\x1a' # 0x1A -> CONTROL CHARACTER
|
| 75 |
+
'\x1b' # 0x1B -> CONTROL CHARACTER
|
| 76 |
+
'\x1c' # 0x1C -> CONTROL CHARACTER
|
| 77 |
+
'\x1d' # 0x1D -> CONTROL CHARACTER
|
| 78 |
+
'\x1e' # 0x1E -> CONTROL CHARACTER
|
| 79 |
+
'\x1f' # 0x1F -> CONTROL CHARACTER
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> CONTROL CHARACTER
|
| 176 |
+
'\xc4' # 0x80 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 177 |
+
'\xc5' # 0x81 -> LATIN CAPITAL LETTER A WITH RING ABOVE
|
| 178 |
+
'\xc7' # 0x82 -> LATIN CAPITAL LETTER C WITH CEDILLA
|
| 179 |
+
'\xc9' # 0x83 -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 180 |
+
'\xd1' # 0x84 -> LATIN CAPITAL LETTER N WITH TILDE
|
| 181 |
+
'\xd6' # 0x85 -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 182 |
+
'\xdc' # 0x86 -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 183 |
+
'\xe1' # 0x87 -> LATIN SMALL LETTER A WITH ACUTE
|
| 184 |
+
'\xe0' # 0x88 -> LATIN SMALL LETTER A WITH GRAVE
|
| 185 |
+
'\xe2' # 0x89 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
|
| 186 |
+
'\xe4' # 0x8A -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 187 |
+
'\xe3' # 0x8B -> LATIN SMALL LETTER A WITH TILDE
|
| 188 |
+
'\xe5' # 0x8C -> LATIN SMALL LETTER A WITH RING ABOVE
|
| 189 |
+
'\xe7' # 0x8D -> LATIN SMALL LETTER C WITH CEDILLA
|
| 190 |
+
'\xe9' # 0x8E -> LATIN SMALL LETTER E WITH ACUTE
|
| 191 |
+
'\xe8' # 0x8F -> LATIN SMALL LETTER E WITH GRAVE
|
| 192 |
+
'\xea' # 0x90 -> LATIN SMALL LETTER E WITH CIRCUMFLEX
|
| 193 |
+
'\xeb' # 0x91 -> LATIN SMALL LETTER E WITH DIAERESIS
|
| 194 |
+
'\xed' # 0x92 -> LATIN SMALL LETTER I WITH ACUTE
|
| 195 |
+
'\xec' # 0x93 -> LATIN SMALL LETTER I WITH GRAVE
|
| 196 |
+
'\xee' # 0x94 -> LATIN SMALL LETTER I WITH CIRCUMFLEX
|
| 197 |
+
'\xef' # 0x95 -> LATIN SMALL LETTER I WITH DIAERESIS
|
| 198 |
+
'\xf1' # 0x96 -> LATIN SMALL LETTER N WITH TILDE
|
| 199 |
+
'\xf3' # 0x97 -> LATIN SMALL LETTER O WITH ACUTE
|
| 200 |
+
'\xf2' # 0x98 -> LATIN SMALL LETTER O WITH GRAVE
|
| 201 |
+
'\xf4' # 0x99 -> LATIN SMALL LETTER O WITH CIRCUMFLEX
|
| 202 |
+
'\xf6' # 0x9A -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 203 |
+
'\xf5' # 0x9B -> LATIN SMALL LETTER O WITH TILDE
|
| 204 |
+
'\xfa' # 0x9C -> LATIN SMALL LETTER U WITH ACUTE
|
| 205 |
+
'\xf9' # 0x9D -> LATIN SMALL LETTER U WITH GRAVE
|
| 206 |
+
'\xfb' # 0x9E -> LATIN SMALL LETTER U WITH CIRCUMFLEX
|
| 207 |
+
'\xfc' # 0x9F -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 208 |
+
'\u2020' # 0xA0 -> DAGGER
|
| 209 |
+
'\xb0' # 0xA1 -> DEGREE SIGN
|
| 210 |
+
'\xa2' # 0xA2 -> CENT SIGN
|
| 211 |
+
'\xa3' # 0xA3 -> POUND SIGN
|
| 212 |
+
'\xa7' # 0xA4 -> SECTION SIGN
|
| 213 |
+
'\u2022' # 0xA5 -> BULLET
|
| 214 |
+
'\xb6' # 0xA6 -> PILCROW SIGN
|
| 215 |
+
'\xdf' # 0xA7 -> LATIN SMALL LETTER SHARP S
|
| 216 |
+
'\xae' # 0xA8 -> REGISTERED SIGN
|
| 217 |
+
'\u0160' # 0xA9 -> LATIN CAPITAL LETTER S WITH CARON
|
| 218 |
+
'\u2122' # 0xAA -> TRADE MARK SIGN
|
| 219 |
+
'\xb4' # 0xAB -> ACUTE ACCENT
|
| 220 |
+
'\xa8' # 0xAC -> DIAERESIS
|
| 221 |
+
'\u2260' # 0xAD -> NOT EQUAL TO
|
| 222 |
+
'\u017d' # 0xAE -> LATIN CAPITAL LETTER Z WITH CARON
|
| 223 |
+
'\xd8' # 0xAF -> LATIN CAPITAL LETTER O WITH STROKE
|
| 224 |
+
'\u221e' # 0xB0 -> INFINITY
|
| 225 |
+
'\xb1' # 0xB1 -> PLUS-MINUS SIGN
|
| 226 |
+
'\u2264' # 0xB2 -> LESS-THAN OR EQUAL TO
|
| 227 |
+
'\u2265' # 0xB3 -> GREATER-THAN OR EQUAL TO
|
| 228 |
+
'\u2206' # 0xB4 -> INCREMENT
|
| 229 |
+
'\xb5' # 0xB5 -> MICRO SIGN
|
| 230 |
+
'\u2202' # 0xB6 -> PARTIAL DIFFERENTIAL
|
| 231 |
+
'\u2211' # 0xB7 -> N-ARY SUMMATION
|
| 232 |
+
'\u220f' # 0xB8 -> N-ARY PRODUCT
|
| 233 |
+
'\u0161' # 0xB9 -> LATIN SMALL LETTER S WITH CARON
|
| 234 |
+
'\u222b' # 0xBA -> INTEGRAL
|
| 235 |
+
'\xaa' # 0xBB -> FEMININE ORDINAL INDICATOR
|
| 236 |
+
'\xba' # 0xBC -> MASCULINE ORDINAL INDICATOR
|
| 237 |
+
'\u03a9' # 0xBD -> GREEK CAPITAL LETTER OMEGA
|
| 238 |
+
'\u017e' # 0xBE -> LATIN SMALL LETTER Z WITH CARON
|
| 239 |
+
'\xf8' # 0xBF -> LATIN SMALL LETTER O WITH STROKE
|
| 240 |
+
'\xbf' # 0xC0 -> INVERTED QUESTION MARK
|
| 241 |
+
'\xa1' # 0xC1 -> INVERTED EXCLAMATION MARK
|
| 242 |
+
'\xac' # 0xC2 -> NOT SIGN
|
| 243 |
+
'\u221a' # 0xC3 -> SQUARE ROOT
|
| 244 |
+
'\u0192' # 0xC4 -> LATIN SMALL LETTER F WITH HOOK
|
| 245 |
+
'\u2248' # 0xC5 -> ALMOST EQUAL TO
|
| 246 |
+
'\u0106' # 0xC6 -> LATIN CAPITAL LETTER C WITH ACUTE
|
| 247 |
+
'\xab' # 0xC7 -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 248 |
+
'\u010c' # 0xC8 -> LATIN CAPITAL LETTER C WITH CARON
|
| 249 |
+
'\u2026' # 0xC9 -> HORIZONTAL ELLIPSIS
|
| 250 |
+
'\xa0' # 0xCA -> NO-BREAK SPACE
|
| 251 |
+
'\xc0' # 0xCB -> LATIN CAPITAL LETTER A WITH GRAVE
|
| 252 |
+
'\xc3' # 0xCC -> LATIN CAPITAL LETTER A WITH TILDE
|
| 253 |
+
'\xd5' # 0xCD -> LATIN CAPITAL LETTER O WITH TILDE
|
| 254 |
+
'\u0152' # 0xCE -> LATIN CAPITAL LIGATURE OE
|
| 255 |
+
'\u0153' # 0xCF -> LATIN SMALL LIGATURE OE
|
| 256 |
+
'\u0110' # 0xD0 -> LATIN CAPITAL LETTER D WITH STROKE
|
| 257 |
+
'\u2014' # 0xD1 -> EM DASH
|
| 258 |
+
'\u201c' # 0xD2 -> LEFT DOUBLE QUOTATION MARK
|
| 259 |
+
'\u201d' # 0xD3 -> RIGHT DOUBLE QUOTATION MARK
|
| 260 |
+
'\u2018' # 0xD4 -> LEFT SINGLE QUOTATION MARK
|
| 261 |
+
'\u2019' # 0xD5 -> RIGHT SINGLE QUOTATION MARK
|
| 262 |
+
'\xf7' # 0xD6 -> DIVISION SIGN
|
| 263 |
+
'\u25ca' # 0xD7 -> LOZENGE
|
| 264 |
+
'\uf8ff' # 0xD8 -> Apple logo
|
| 265 |
+
'\xa9' # 0xD9 -> COPYRIGHT SIGN
|
| 266 |
+
'\u2044' # 0xDA -> FRACTION SLASH
|
| 267 |
+
'\u20ac' # 0xDB -> EURO SIGN
|
| 268 |
+
'\u2039' # 0xDC -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
| 269 |
+
'\u203a' # 0xDD -> SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
| 270 |
+
'\xc6' # 0xDE -> LATIN CAPITAL LETTER AE
|
| 271 |
+
'\xbb' # 0xDF -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 272 |
+
'\u2013' # 0xE0 -> EN DASH
|
| 273 |
+
'\xb7' # 0xE1 -> MIDDLE DOT
|
| 274 |
+
'\u201a' # 0xE2 -> SINGLE LOW-9 QUOTATION MARK
|
| 275 |
+
'\u201e' # 0xE3 -> DOUBLE LOW-9 QUOTATION MARK
|
| 276 |
+
'\u2030' # 0xE4 -> PER MILLE SIGN
|
| 277 |
+
'\xc2' # 0xE5 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
| 278 |
+
'\u0107' # 0xE6 -> LATIN SMALL LETTER C WITH ACUTE
|
| 279 |
+
'\xc1' # 0xE7 -> LATIN CAPITAL LETTER A WITH ACUTE
|
| 280 |
+
'\u010d' # 0xE8 -> LATIN SMALL LETTER C WITH CARON
|
| 281 |
+
'\xc8' # 0xE9 -> LATIN CAPITAL LETTER E WITH GRAVE
|
| 282 |
+
'\xcd' # 0xEA -> LATIN CAPITAL LETTER I WITH ACUTE
|
| 283 |
+
'\xce' # 0xEB -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
| 284 |
+
'\xcf' # 0xEC -> LATIN CAPITAL LETTER I WITH DIAERESIS
|
| 285 |
+
'\xcc' # 0xED -> LATIN CAPITAL LETTER I WITH GRAVE
|
| 286 |
+
'\xd3' # 0xEE -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 287 |
+
'\xd4' # 0xEF -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
| 288 |
+
'\u0111' # 0xF0 -> LATIN SMALL LETTER D WITH STROKE
|
| 289 |
+
'\xd2' # 0xF1 -> LATIN CAPITAL LETTER O WITH GRAVE
|
| 290 |
+
'\xda' # 0xF2 -> LATIN CAPITAL LETTER U WITH ACUTE
|
| 291 |
+
'\xdb' # 0xF3 -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
| 292 |
+
'\xd9' # 0xF4 -> LATIN CAPITAL LETTER U WITH GRAVE
|
| 293 |
+
'\u0131' # 0xF5 -> LATIN SMALL LETTER DOTLESS I
|
| 294 |
+
'\u02c6' # 0xF6 -> MODIFIER LETTER CIRCUMFLEX ACCENT
|
| 295 |
+
'\u02dc' # 0xF7 -> SMALL TILDE
|
| 296 |
+
'\xaf' # 0xF8 -> MACRON
|
| 297 |
+
'\u03c0' # 0xF9 -> GREEK SMALL LETTER PI
|
| 298 |
+
'\xcb' # 0xFA -> LATIN CAPITAL LETTER E WITH DIAERESIS
|
| 299 |
+
'\u02da' # 0xFB -> RING ABOVE
|
| 300 |
+
'\xb8' # 0xFC -> CEDILLA
|
| 301 |
+
'\xca' # 0xFD -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
| 302 |
+
'\xe6' # 0xFE -> LATIN SMALL LETTER AE
|
| 303 |
+
'\u02c7' # 0xFF -> CARON
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/mac_iceland.py
ADDED
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):
|
| 10 |
+
|
| 11 |
+
def encode(self,input,errors='strict'):
|
| 12 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 13 |
+
|
| 14 |
+
def decode(self,input,errors='strict'):
|
| 15 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 16 |
+
|
| 17 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 20 |
+
|
| 21 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 22 |
+
def decode(self, input, final=False):
|
| 23 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 24 |
+
|
| 25 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 26 |
+
pass
|
| 27 |
+
|
| 28 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
### encodings module API
|
| 32 |
+
|
| 33 |
+
def getregentry():
|
| 34 |
+
return codecs.CodecInfo(
|
| 35 |
+
name='mac-iceland',
|
| 36 |
+
encode=Codec().encode,
|
| 37 |
+
decode=Codec().decode,
|
| 38 |
+
incrementalencoder=IncrementalEncoder,
|
| 39 |
+
incrementaldecoder=IncrementalDecoder,
|
| 40 |
+
streamreader=StreamReader,
|
| 41 |
+
streamwriter=StreamWriter,
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Decoding Table
|
| 46 |
+
|
| 47 |
+
decoding_table = (
|
| 48 |
+
'\x00' # 0x00 -> CONTROL CHARACTER
|
| 49 |
+
'\x01' # 0x01 -> CONTROL CHARACTER
|
| 50 |
+
'\x02' # 0x02 -> CONTROL CHARACTER
|
| 51 |
+
'\x03' # 0x03 -> CONTROL CHARACTER
|
| 52 |
+
'\x04' # 0x04 -> CONTROL CHARACTER
|
| 53 |
+
'\x05' # 0x05 -> CONTROL CHARACTER
|
| 54 |
+
'\x06' # 0x06 -> CONTROL CHARACTER
|
| 55 |
+
'\x07' # 0x07 -> CONTROL CHARACTER
|
| 56 |
+
'\x08' # 0x08 -> CONTROL CHARACTER
|
| 57 |
+
'\t' # 0x09 -> CONTROL CHARACTER
|
| 58 |
+
'\n' # 0x0A -> CONTROL CHARACTER
|
| 59 |
+
'\x0b' # 0x0B -> CONTROL CHARACTER
|
| 60 |
+
'\x0c' # 0x0C -> CONTROL CHARACTER
|
| 61 |
+
'\r' # 0x0D -> CONTROL CHARACTER
|
| 62 |
+
'\x0e' # 0x0E -> CONTROL CHARACTER
|
| 63 |
+
'\x0f' # 0x0F -> CONTROL CHARACTER
|
| 64 |
+
'\x10' # 0x10 -> CONTROL CHARACTER
|
| 65 |
+
'\x11' # 0x11 -> CONTROL CHARACTER
|
| 66 |
+
'\x12' # 0x12 -> CONTROL CHARACTER
|
| 67 |
+
'\x13' # 0x13 -> CONTROL CHARACTER
|
| 68 |
+
'\x14' # 0x14 -> CONTROL CHARACTER
|
| 69 |
+
'\x15' # 0x15 -> CONTROL CHARACTER
|
| 70 |
+
'\x16' # 0x16 -> CONTROL CHARACTER
|
| 71 |
+
'\x17' # 0x17 -> CONTROL CHARACTER
|
| 72 |
+
'\x18' # 0x18 -> CONTROL CHARACTER
|
| 73 |
+
'\x19' # 0x19 -> CONTROL CHARACTER
|
| 74 |
+
'\x1a' # 0x1A -> CONTROL CHARACTER
|
| 75 |
+
'\x1b' # 0x1B -> CONTROL CHARACTER
|
| 76 |
+
'\x1c' # 0x1C -> CONTROL CHARACTER
|
| 77 |
+
'\x1d' # 0x1D -> CONTROL CHARACTER
|
| 78 |
+
'\x1e' # 0x1E -> CONTROL CHARACTER
|
| 79 |
+
'\x1f' # 0x1F -> CONTROL CHARACTER
|
| 80 |
+
' ' # 0x20 -> SPACE
|
| 81 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 82 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 83 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 84 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 85 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 86 |
+
'&' # 0x26 -> AMPERSAND
|
| 87 |
+
"'" # 0x27 -> APOSTROPHE
|
| 88 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 89 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 90 |
+
'*' # 0x2A -> ASTERISK
|
| 91 |
+
'+' # 0x2B -> PLUS SIGN
|
| 92 |
+
',' # 0x2C -> COMMA
|
| 93 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 94 |
+
'.' # 0x2E -> FULL STOP
|
| 95 |
+
'/' # 0x2F -> SOLIDUS
|
| 96 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 97 |
+
'1' # 0x31 -> DIGIT ONE
|
| 98 |
+
'2' # 0x32 -> DIGIT TWO
|
| 99 |
+
'3' # 0x33 -> DIGIT THREE
|
| 100 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 101 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 102 |
+
'6' # 0x36 -> DIGIT SIX
|
| 103 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 104 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 105 |
+
'9' # 0x39 -> DIGIT NINE
|
| 106 |
+
':' # 0x3A -> COLON
|
| 107 |
+
';' # 0x3B -> SEMICOLON
|
| 108 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 109 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 110 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 111 |
+
'?' # 0x3F -> QUESTION MARK
|
| 112 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 113 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 114 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 115 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 116 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 117 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 118 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 119 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 120 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 121 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 122 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 123 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 124 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 125 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 126 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 127 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 128 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 129 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 130 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 131 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 132 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 133 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 134 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 135 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 136 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 137 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 138 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 139 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 140 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 141 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 142 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 143 |
+
'_' # 0x5F -> LOW LINE
|
| 144 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 145 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 146 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 147 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 148 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 149 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 150 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 151 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 152 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 153 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 154 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 155 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 156 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 157 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 158 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 159 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 160 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 161 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 162 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 163 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 164 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 165 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 166 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 167 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 168 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 169 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 170 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 171 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 172 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 173 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 174 |
+
'~' # 0x7E -> TILDE
|
| 175 |
+
'\x7f' # 0x7F -> CONTROL CHARACTER
|
| 176 |
+
'\xc4' # 0x80 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 177 |
+
'\xc5' # 0x81 -> LATIN CAPITAL LETTER A WITH RING ABOVE
|
| 178 |
+
'\xc7' # 0x82 -> LATIN CAPITAL LETTER C WITH CEDILLA
|
| 179 |
+
'\xc9' # 0x83 -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 180 |
+
'\xd1' # 0x84 -> LATIN CAPITAL LETTER N WITH TILDE
|
| 181 |
+
'\xd6' # 0x85 -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 182 |
+
'\xdc' # 0x86 -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 183 |
+
'\xe1' # 0x87 -> LATIN SMALL LETTER A WITH ACUTE
|
| 184 |
+
'\xe0' # 0x88 -> LATIN SMALL LETTER A WITH GRAVE
|
| 185 |
+
'\xe2' # 0x89 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
|
| 186 |
+
'\xe4' # 0x8A -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 187 |
+
'\xe3' # 0x8B -> LATIN SMALL LETTER A WITH TILDE
|
| 188 |
+
'\xe5' # 0x8C -> LATIN SMALL LETTER A WITH RING ABOVE
|
| 189 |
+
'\xe7' # 0x8D -> LATIN SMALL LETTER C WITH CEDILLA
|
| 190 |
+
'\xe9' # 0x8E -> LATIN SMALL LETTER E WITH ACUTE
|
| 191 |
+
'\xe8' # 0x8F -> LATIN SMALL LETTER E WITH GRAVE
|
| 192 |
+
'\xea' # 0x90 -> LATIN SMALL LETTER E WITH CIRCUMFLEX
|
| 193 |
+
'\xeb' # 0x91 -> LATIN SMALL LETTER E WITH DIAERESIS
|
| 194 |
+
'\xed' # 0x92 -> LATIN SMALL LETTER I WITH ACUTE
|
| 195 |
+
'\xec' # 0x93 -> LATIN SMALL LETTER I WITH GRAVE
|
| 196 |
+
'\xee' # 0x94 -> LATIN SMALL LETTER I WITH CIRCUMFLEX
|
| 197 |
+
'\xef' # 0x95 -> LATIN SMALL LETTER I WITH DIAERESIS
|
| 198 |
+
'\xf1' # 0x96 -> LATIN SMALL LETTER N WITH TILDE
|
| 199 |
+
'\xf3' # 0x97 -> LATIN SMALL LETTER O WITH ACUTE
|
| 200 |
+
'\xf2' # 0x98 -> LATIN SMALL LETTER O WITH GRAVE
|
| 201 |
+
'\xf4' # 0x99 -> LATIN SMALL LETTER O WITH CIRCUMFLEX
|
| 202 |
+
'\xf6' # 0x9A -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 203 |
+
'\xf5' # 0x9B -> LATIN SMALL LETTER O WITH TILDE
|
| 204 |
+
'\xfa' # 0x9C -> LATIN SMALL LETTER U WITH ACUTE
|
| 205 |
+
'\xf9' # 0x9D -> LATIN SMALL LETTER U WITH GRAVE
|
| 206 |
+
'\xfb' # 0x9E -> LATIN SMALL LETTER U WITH CIRCUMFLEX
|
| 207 |
+
'\xfc' # 0x9F -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 208 |
+
'\xdd' # 0xA0 -> LATIN CAPITAL LETTER Y WITH ACUTE
|
| 209 |
+
'\xb0' # 0xA1 -> DEGREE SIGN
|
| 210 |
+
'\xa2' # 0xA2 -> CENT SIGN
|
| 211 |
+
'\xa3' # 0xA3 -> POUND SIGN
|
| 212 |
+
'\xa7' # 0xA4 -> SECTION SIGN
|
| 213 |
+
'\u2022' # 0xA5 -> BULLET
|
| 214 |
+
'\xb6' # 0xA6 -> PILCROW SIGN
|
| 215 |
+
'\xdf' # 0xA7 -> LATIN SMALL LETTER SHARP S
|
| 216 |
+
'\xae' # 0xA8 -> REGISTERED SIGN
|
| 217 |
+
'\xa9' # 0xA9 -> COPYRIGHT SIGN
|
| 218 |
+
'\u2122' # 0xAA -> TRADE MARK SIGN
|
| 219 |
+
'\xb4' # 0xAB -> ACUTE ACCENT
|
| 220 |
+
'\xa8' # 0xAC -> DIAERESIS
|
| 221 |
+
'\u2260' # 0xAD -> NOT EQUAL TO
|
| 222 |
+
'\xc6' # 0xAE -> LATIN CAPITAL LETTER AE
|
| 223 |
+
'\xd8' # 0xAF -> LATIN CAPITAL LETTER O WITH STROKE
|
| 224 |
+
'\u221e' # 0xB0 -> INFINITY
|
| 225 |
+
'\xb1' # 0xB1 -> PLUS-MINUS SIGN
|
| 226 |
+
'\u2264' # 0xB2 -> LESS-THAN OR EQUAL TO
|
| 227 |
+
'\u2265' # 0xB3 -> GREATER-THAN OR EQUAL TO
|
| 228 |
+
'\xa5' # 0xB4 -> YEN SIGN
|
| 229 |
+
'\xb5' # 0xB5 -> MICRO SIGN
|
| 230 |
+
'\u2202' # 0xB6 -> PARTIAL DIFFERENTIAL
|
| 231 |
+
'\u2211' # 0xB7 -> N-ARY SUMMATION
|
| 232 |
+
'\u220f' # 0xB8 -> N-ARY PRODUCT
|
| 233 |
+
'\u03c0' # 0xB9 -> GREEK SMALL LETTER PI
|
| 234 |
+
'\u222b' # 0xBA -> INTEGRAL
|
| 235 |
+
'\xaa' # 0xBB -> FEMININE ORDINAL INDICATOR
|
| 236 |
+
'\xba' # 0xBC -> MASCULINE ORDINAL INDICATOR
|
| 237 |
+
'\u03a9' # 0xBD -> GREEK CAPITAL LETTER OMEGA
|
| 238 |
+
'\xe6' # 0xBE -> LATIN SMALL LETTER AE
|
| 239 |
+
'\xf8' # 0xBF -> LATIN SMALL LETTER O WITH STROKE
|
| 240 |
+
'\xbf' # 0xC0 -> INVERTED QUESTION MARK
|
| 241 |
+
'\xa1' # 0xC1 -> INVERTED EXCLAMATION MARK
|
| 242 |
+
'\xac' # 0xC2 -> NOT SIGN
|
| 243 |
+
'\u221a' # 0xC3 -> SQUARE ROOT
|
| 244 |
+
'\u0192' # 0xC4 -> LATIN SMALL LETTER F WITH HOOK
|
| 245 |
+
'\u2248' # 0xC5 -> ALMOST EQUAL TO
|
| 246 |
+
'\u2206' # 0xC6 -> INCREMENT
|
| 247 |
+
'\xab' # 0xC7 -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 248 |
+
'\xbb' # 0xC8 -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 249 |
+
'\u2026' # 0xC9 -> HORIZONTAL ELLIPSIS
|
| 250 |
+
'\xa0' # 0xCA -> NO-BREAK SPACE
|
| 251 |
+
'\xc0' # 0xCB -> LATIN CAPITAL LETTER A WITH GRAVE
|
| 252 |
+
'\xc3' # 0xCC -> LATIN CAPITAL LETTER A WITH TILDE
|
| 253 |
+
'\xd5' # 0xCD -> LATIN CAPITAL LETTER O WITH TILDE
|
| 254 |
+
'\u0152' # 0xCE -> LATIN CAPITAL LIGATURE OE
|
| 255 |
+
'\u0153' # 0xCF -> LATIN SMALL LIGATURE OE
|
| 256 |
+
'\u2013' # 0xD0 -> EN DASH
|
| 257 |
+
'\u2014' # 0xD1 -> EM DASH
|
| 258 |
+
'\u201c' # 0xD2 -> LEFT DOUBLE QUOTATION MARK
|
| 259 |
+
'\u201d' # 0xD3 -> RIGHT DOUBLE QUOTATION MARK
|
| 260 |
+
'\u2018' # 0xD4 -> LEFT SINGLE QUOTATION MARK
|
| 261 |
+
'\u2019' # 0xD5 -> RIGHT SINGLE QUOTATION MARK
|
| 262 |
+
'\xf7' # 0xD6 -> DIVISION SIGN
|
| 263 |
+
'\u25ca' # 0xD7 -> LOZENGE
|
| 264 |
+
'\xff' # 0xD8 -> LATIN SMALL LETTER Y WITH DIAERESIS
|
| 265 |
+
'\u0178' # 0xD9 -> LATIN CAPITAL LETTER Y WITH DIAERESIS
|
| 266 |
+
'\u2044' # 0xDA -> FRACTION SLASH
|
| 267 |
+
'\u20ac' # 0xDB -> EURO SIGN
|
| 268 |
+
'\xd0' # 0xDC -> LATIN CAPITAL LETTER ETH
|
| 269 |
+
'\xf0' # 0xDD -> LATIN SMALL LETTER ETH
|
| 270 |
+
'\xde' # 0xDE -> LATIN CAPITAL LETTER THORN
|
| 271 |
+
'\xfe' # 0xDF -> LATIN SMALL LETTER THORN
|
| 272 |
+
'\xfd' # 0xE0 -> LATIN SMALL LETTER Y WITH ACUTE
|
| 273 |
+
'\xb7' # 0xE1 -> MIDDLE DOT
|
| 274 |
+
'\u201a' # 0xE2 -> SINGLE LOW-9 QUOTATION MARK
|
| 275 |
+
'\u201e' # 0xE3 -> DOUBLE LOW-9 QUOTATION MARK
|
| 276 |
+
'\u2030' # 0xE4 -> PER MILLE SIGN
|
| 277 |
+
'\xc2' # 0xE5 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
| 278 |
+
'\xca' # 0xE6 -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
| 279 |
+
'\xc1' # 0xE7 -> LATIN CAPITAL LETTER A WITH ACUTE
|
| 280 |
+
'\xcb' # 0xE8 -> LATIN CAPITAL LETTER E WITH DIAERESIS
|
| 281 |
+
'\xc8' # 0xE9 -> LATIN CAPITAL LETTER E WITH GRAVE
|
| 282 |
+
'\xcd' # 0xEA -> LATIN CAPITAL LETTER I WITH ACUTE
|
| 283 |
+
'\xce' # 0xEB -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
| 284 |
+
'\xcf' # 0xEC -> LATIN CAPITAL LETTER I WITH DIAERESIS
|
| 285 |
+
'\xcc' # 0xED -> LATIN CAPITAL LETTER I WITH GRAVE
|
| 286 |
+
'\xd3' # 0xEE -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 287 |
+
'\xd4' # 0xEF -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
| 288 |
+
'\uf8ff' # 0xF0 -> Apple logo
|
| 289 |
+
'\xd2' # 0xF1 -> LATIN CAPITAL LETTER O WITH GRAVE
|
| 290 |
+
'\xda' # 0xF2 -> LATIN CAPITAL LETTER U WITH ACUTE
|
| 291 |
+
'\xdb' # 0xF3 -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
| 292 |
+
'\xd9' # 0xF4 -> LATIN CAPITAL LETTER U WITH GRAVE
|
| 293 |
+
'\u0131' # 0xF5 -> LATIN SMALL LETTER DOTLESS I
|
| 294 |
+
'\u02c6' # 0xF6 -> MODIFIER LETTER CIRCUMFLEX ACCENT
|
| 295 |
+
'\u02dc' # 0xF7 -> SMALL TILDE
|
| 296 |
+
'\xaf' # 0xF8 -> MACRON
|
| 297 |
+
'\u02d8' # 0xF9 -> BREVE
|
| 298 |
+
'\u02d9' # 0xFA -> DOT ABOVE
|
| 299 |
+
'\u02da' # 0xFB -> RING ABOVE
|
| 300 |
+
'\xb8' # 0xFC -> CEDILLA
|
| 301 |
+
'\u02dd' # 0xFD -> DOUBLE ACUTE ACCENT
|
| 302 |
+
'\u02db' # 0xFE -> OGONEK
|
| 303 |
+
'\u02c7' # 0xFF -> CARON
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
### Encoding table
|
| 307 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/palmos.py
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Python Character Mapping Codec for PalmOS 3.5.
|
| 2 |
+
|
| 3 |
+
Written by Sjoerd Mullender (sjoerd@acm.org); based on iso8859_15.py.
|
| 4 |
+
|
| 5 |
+
"""#"
|
| 6 |
+
|
| 7 |
+
import codecs
|
| 8 |
+
|
| 9 |
+
### Codec APIs
|
| 10 |
+
|
| 11 |
+
class Codec(codecs.Codec):
|
| 12 |
+
def encode(self,input,errors='strict'):
|
| 13 |
+
return codecs.charmap_encode(input,errors,encoding_table)
|
| 14 |
+
|
| 15 |
+
def decode(self,input,errors='strict'):
|
| 16 |
+
return codecs.charmap_decode(input,errors,decoding_table)
|
| 17 |
+
|
| 18 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 19 |
+
def encode(self, input, final=False):
|
| 20 |
+
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
|
| 21 |
+
|
| 22 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 23 |
+
def decode(self, input, final=False):
|
| 24 |
+
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
| 25 |
+
|
| 26 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 27 |
+
pass
|
| 28 |
+
|
| 29 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 30 |
+
pass
|
| 31 |
+
|
| 32 |
+
### encodings module API
|
| 33 |
+
|
| 34 |
+
def getregentry():
|
| 35 |
+
return codecs.CodecInfo(
|
| 36 |
+
name='palmos',
|
| 37 |
+
encode=Codec().encode,
|
| 38 |
+
decode=Codec().decode,
|
| 39 |
+
incrementalencoder=IncrementalEncoder,
|
| 40 |
+
incrementaldecoder=IncrementalDecoder,
|
| 41 |
+
streamreader=StreamReader,
|
| 42 |
+
streamwriter=StreamWriter,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
### Decoding Table
|
| 47 |
+
|
| 48 |
+
decoding_table = (
|
| 49 |
+
'\x00' # 0x00 -> NULL
|
| 50 |
+
'\x01' # 0x01 -> START OF HEADING
|
| 51 |
+
'\x02' # 0x02 -> START OF TEXT
|
| 52 |
+
'\x03' # 0x03 -> END OF TEXT
|
| 53 |
+
'\x04' # 0x04 -> END OF TRANSMISSION
|
| 54 |
+
'\x05' # 0x05 -> ENQUIRY
|
| 55 |
+
'\x06' # 0x06 -> ACKNOWLEDGE
|
| 56 |
+
'\x07' # 0x07 -> BELL
|
| 57 |
+
'\x08' # 0x08 -> BACKSPACE
|
| 58 |
+
'\t' # 0x09 -> HORIZONTAL TABULATION
|
| 59 |
+
'\n' # 0x0A -> LINE FEED
|
| 60 |
+
'\x0b' # 0x0B -> VERTICAL TABULATION
|
| 61 |
+
'\x0c' # 0x0C -> FORM FEED
|
| 62 |
+
'\r' # 0x0D -> CARRIAGE RETURN
|
| 63 |
+
'\x0e' # 0x0E -> SHIFT OUT
|
| 64 |
+
'\x0f' # 0x0F -> SHIFT IN
|
| 65 |
+
'\x10' # 0x10 -> DATA LINK ESCAPE
|
| 66 |
+
'\x11' # 0x11 -> DEVICE CONTROL ONE
|
| 67 |
+
'\x12' # 0x12 -> DEVICE CONTROL TWO
|
| 68 |
+
'\x13' # 0x13 -> DEVICE CONTROL THREE
|
| 69 |
+
'\x14' # 0x14 -> DEVICE CONTROL FOUR
|
| 70 |
+
'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
|
| 71 |
+
'\x16' # 0x16 -> SYNCHRONOUS IDLE
|
| 72 |
+
'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
|
| 73 |
+
'\x18' # 0x18 -> CANCEL
|
| 74 |
+
'\x19' # 0x19 -> END OF MEDIUM
|
| 75 |
+
'\x1a' # 0x1A -> SUBSTITUTE
|
| 76 |
+
'\x1b' # 0x1B -> ESCAPE
|
| 77 |
+
'\x1c' # 0x1C -> FILE SEPARATOR
|
| 78 |
+
'\x1d' # 0x1D -> GROUP SEPARATOR
|
| 79 |
+
'\x1e' # 0x1E -> RECORD SEPARATOR
|
| 80 |
+
'\x1f' # 0x1F -> UNIT SEPARATOR
|
| 81 |
+
' ' # 0x20 -> SPACE
|
| 82 |
+
'!' # 0x21 -> EXCLAMATION MARK
|
| 83 |
+
'"' # 0x22 -> QUOTATION MARK
|
| 84 |
+
'#' # 0x23 -> NUMBER SIGN
|
| 85 |
+
'$' # 0x24 -> DOLLAR SIGN
|
| 86 |
+
'%' # 0x25 -> PERCENT SIGN
|
| 87 |
+
'&' # 0x26 -> AMPERSAND
|
| 88 |
+
"'" # 0x27 -> APOSTROPHE
|
| 89 |
+
'(' # 0x28 -> LEFT PARENTHESIS
|
| 90 |
+
')' # 0x29 -> RIGHT PARENTHESIS
|
| 91 |
+
'*' # 0x2A -> ASTERISK
|
| 92 |
+
'+' # 0x2B -> PLUS SIGN
|
| 93 |
+
',' # 0x2C -> COMMA
|
| 94 |
+
'-' # 0x2D -> HYPHEN-MINUS
|
| 95 |
+
'.' # 0x2E -> FULL STOP
|
| 96 |
+
'/' # 0x2F -> SOLIDUS
|
| 97 |
+
'0' # 0x30 -> DIGIT ZERO
|
| 98 |
+
'1' # 0x31 -> DIGIT ONE
|
| 99 |
+
'2' # 0x32 -> DIGIT TWO
|
| 100 |
+
'3' # 0x33 -> DIGIT THREE
|
| 101 |
+
'4' # 0x34 -> DIGIT FOUR
|
| 102 |
+
'5' # 0x35 -> DIGIT FIVE
|
| 103 |
+
'6' # 0x36 -> DIGIT SIX
|
| 104 |
+
'7' # 0x37 -> DIGIT SEVEN
|
| 105 |
+
'8' # 0x38 -> DIGIT EIGHT
|
| 106 |
+
'9' # 0x39 -> DIGIT NINE
|
| 107 |
+
':' # 0x3A -> COLON
|
| 108 |
+
';' # 0x3B -> SEMICOLON
|
| 109 |
+
'<' # 0x3C -> LESS-THAN SIGN
|
| 110 |
+
'=' # 0x3D -> EQUALS SIGN
|
| 111 |
+
'>' # 0x3E -> GREATER-THAN SIGN
|
| 112 |
+
'?' # 0x3F -> QUESTION MARK
|
| 113 |
+
'@' # 0x40 -> COMMERCIAL AT
|
| 114 |
+
'A' # 0x41 -> LATIN CAPITAL LETTER A
|
| 115 |
+
'B' # 0x42 -> LATIN CAPITAL LETTER B
|
| 116 |
+
'C' # 0x43 -> LATIN CAPITAL LETTER C
|
| 117 |
+
'D' # 0x44 -> LATIN CAPITAL LETTER D
|
| 118 |
+
'E' # 0x45 -> LATIN CAPITAL LETTER E
|
| 119 |
+
'F' # 0x46 -> LATIN CAPITAL LETTER F
|
| 120 |
+
'G' # 0x47 -> LATIN CAPITAL LETTER G
|
| 121 |
+
'H' # 0x48 -> LATIN CAPITAL LETTER H
|
| 122 |
+
'I' # 0x49 -> LATIN CAPITAL LETTER I
|
| 123 |
+
'J' # 0x4A -> LATIN CAPITAL LETTER J
|
| 124 |
+
'K' # 0x4B -> LATIN CAPITAL LETTER K
|
| 125 |
+
'L' # 0x4C -> LATIN CAPITAL LETTER L
|
| 126 |
+
'M' # 0x4D -> LATIN CAPITAL LETTER M
|
| 127 |
+
'N' # 0x4E -> LATIN CAPITAL LETTER N
|
| 128 |
+
'O' # 0x4F -> LATIN CAPITAL LETTER O
|
| 129 |
+
'P' # 0x50 -> LATIN CAPITAL LETTER P
|
| 130 |
+
'Q' # 0x51 -> LATIN CAPITAL LETTER Q
|
| 131 |
+
'R' # 0x52 -> LATIN CAPITAL LETTER R
|
| 132 |
+
'S' # 0x53 -> LATIN CAPITAL LETTER S
|
| 133 |
+
'T' # 0x54 -> LATIN CAPITAL LETTER T
|
| 134 |
+
'U' # 0x55 -> LATIN CAPITAL LETTER U
|
| 135 |
+
'V' # 0x56 -> LATIN CAPITAL LETTER V
|
| 136 |
+
'W' # 0x57 -> LATIN CAPITAL LETTER W
|
| 137 |
+
'X' # 0x58 -> LATIN CAPITAL LETTER X
|
| 138 |
+
'Y' # 0x59 -> LATIN CAPITAL LETTER Y
|
| 139 |
+
'Z' # 0x5A -> LATIN CAPITAL LETTER Z
|
| 140 |
+
'[' # 0x5B -> LEFT SQUARE BRACKET
|
| 141 |
+
'\\' # 0x5C -> REVERSE SOLIDUS
|
| 142 |
+
']' # 0x5D -> RIGHT SQUARE BRACKET
|
| 143 |
+
'^' # 0x5E -> CIRCUMFLEX ACCENT
|
| 144 |
+
'_' # 0x5F -> LOW LINE
|
| 145 |
+
'`' # 0x60 -> GRAVE ACCENT
|
| 146 |
+
'a' # 0x61 -> LATIN SMALL LETTER A
|
| 147 |
+
'b' # 0x62 -> LATIN SMALL LETTER B
|
| 148 |
+
'c' # 0x63 -> LATIN SMALL LETTER C
|
| 149 |
+
'd' # 0x64 -> LATIN SMALL LETTER D
|
| 150 |
+
'e' # 0x65 -> LATIN SMALL LETTER E
|
| 151 |
+
'f' # 0x66 -> LATIN SMALL LETTER F
|
| 152 |
+
'g' # 0x67 -> LATIN SMALL LETTER G
|
| 153 |
+
'h' # 0x68 -> LATIN SMALL LETTER H
|
| 154 |
+
'i' # 0x69 -> LATIN SMALL LETTER I
|
| 155 |
+
'j' # 0x6A -> LATIN SMALL LETTER J
|
| 156 |
+
'k' # 0x6B -> LATIN SMALL LETTER K
|
| 157 |
+
'l' # 0x6C -> LATIN SMALL LETTER L
|
| 158 |
+
'm' # 0x6D -> LATIN SMALL LETTER M
|
| 159 |
+
'n' # 0x6E -> LATIN SMALL LETTER N
|
| 160 |
+
'o' # 0x6F -> LATIN SMALL LETTER O
|
| 161 |
+
'p' # 0x70 -> LATIN SMALL LETTER P
|
| 162 |
+
'q' # 0x71 -> LATIN SMALL LETTER Q
|
| 163 |
+
'r' # 0x72 -> LATIN SMALL LETTER R
|
| 164 |
+
's' # 0x73 -> LATIN SMALL LETTER S
|
| 165 |
+
't' # 0x74 -> LATIN SMALL LETTER T
|
| 166 |
+
'u' # 0x75 -> LATIN SMALL LETTER U
|
| 167 |
+
'v' # 0x76 -> LATIN SMALL LETTER V
|
| 168 |
+
'w' # 0x77 -> LATIN SMALL LETTER W
|
| 169 |
+
'x' # 0x78 -> LATIN SMALL LETTER X
|
| 170 |
+
'y' # 0x79 -> LATIN SMALL LETTER Y
|
| 171 |
+
'z' # 0x7A -> LATIN SMALL LETTER Z
|
| 172 |
+
'{' # 0x7B -> LEFT CURLY BRACKET
|
| 173 |
+
'|' # 0x7C -> VERTICAL LINE
|
| 174 |
+
'}' # 0x7D -> RIGHT CURLY BRACKET
|
| 175 |
+
'~' # 0x7E -> TILDE
|
| 176 |
+
'\x7f' # 0x7F -> DELETE
|
| 177 |
+
'\u20ac' # 0x80 -> EURO SIGN
|
| 178 |
+
'\x81' # 0x81 -> <control>
|
| 179 |
+
'\u201a' # 0x82 -> SINGLE LOW-9 QUOTATION MARK
|
| 180 |
+
'\u0192' # 0x83 -> LATIN SMALL LETTER F WITH HOOK
|
| 181 |
+
'\u201e' # 0x84 -> DOUBLE LOW-9 QUOTATION MARK
|
| 182 |
+
'\u2026' # 0x85 -> HORIZONTAL ELLIPSIS
|
| 183 |
+
'\u2020' # 0x86 -> DAGGER
|
| 184 |
+
'\u2021' # 0x87 -> DOUBLE DAGGER
|
| 185 |
+
'\u02c6' # 0x88 -> MODIFIER LETTER CIRCUMFLEX ACCENT
|
| 186 |
+
'\u2030' # 0x89 -> PER MILLE SIGN
|
| 187 |
+
'\u0160' # 0x8A -> LATIN CAPITAL LETTER S WITH CARON
|
| 188 |
+
'\u2039' # 0x8B -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
| 189 |
+
'\u0152' # 0x8C -> LATIN CAPITAL LIGATURE OE
|
| 190 |
+
'\u2666' # 0x8D -> BLACK DIAMOND SUIT
|
| 191 |
+
'\u2663' # 0x8E -> BLACK CLUB SUIT
|
| 192 |
+
'\u2665' # 0x8F -> BLACK HEART SUIT
|
| 193 |
+
'\u2660' # 0x90 -> BLACK SPADE SUIT
|
| 194 |
+
'\u2018' # 0x91 -> LEFT SINGLE QUOTATION MARK
|
| 195 |
+
'\u2019' # 0x92 -> RIGHT SINGLE QUOTATION MARK
|
| 196 |
+
'\u201c' # 0x93 -> LEFT DOUBLE QUOTATION MARK
|
| 197 |
+
'\u201d' # 0x94 -> RIGHT DOUBLE QUOTATION MARK
|
| 198 |
+
'\u2022' # 0x95 -> BULLET
|
| 199 |
+
'\u2013' # 0x96 -> EN DASH
|
| 200 |
+
'\u2014' # 0x97 -> EM DASH
|
| 201 |
+
'\u02dc' # 0x98 -> SMALL TILDE
|
| 202 |
+
'\u2122' # 0x99 -> TRADE MARK SIGN
|
| 203 |
+
'\u0161' # 0x9A -> LATIN SMALL LETTER S WITH CARON
|
| 204 |
+
'\x9b' # 0x9B -> <control>
|
| 205 |
+
'\u0153' # 0x9C -> LATIN SMALL LIGATURE OE
|
| 206 |
+
'\x9d' # 0x9D -> <control>
|
| 207 |
+
'\x9e' # 0x9E -> <control>
|
| 208 |
+
'\u0178' # 0x9F -> LATIN CAPITAL LETTER Y WITH DIAERESIS
|
| 209 |
+
'\xa0' # 0xA0 -> NO-BREAK SPACE
|
| 210 |
+
'\xa1' # 0xA1 -> INVERTED EXCLAMATION MARK
|
| 211 |
+
'\xa2' # 0xA2 -> CENT SIGN
|
| 212 |
+
'\xa3' # 0xA3 -> POUND SIGN
|
| 213 |
+
'\xa4' # 0xA4 -> CURRENCY SIGN
|
| 214 |
+
'\xa5' # 0xA5 -> YEN SIGN
|
| 215 |
+
'\xa6' # 0xA6 -> BROKEN BAR
|
| 216 |
+
'\xa7' # 0xA7 -> SECTION SIGN
|
| 217 |
+
'\xa8' # 0xA8 -> DIAERESIS
|
| 218 |
+
'\xa9' # 0xA9 -> COPYRIGHT SIGN
|
| 219 |
+
'\xaa' # 0xAA -> FEMININE ORDINAL INDICATOR
|
| 220 |
+
'\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 221 |
+
'\xac' # 0xAC -> NOT SIGN
|
| 222 |
+
'\xad' # 0xAD -> SOFT HYPHEN
|
| 223 |
+
'\xae' # 0xAE -> REGISTERED SIGN
|
| 224 |
+
'\xaf' # 0xAF -> MACRON
|
| 225 |
+
'\xb0' # 0xB0 -> DEGREE SIGN
|
| 226 |
+
'\xb1' # 0xB1 -> PLUS-MINUS SIGN
|
| 227 |
+
'\xb2' # 0xB2 -> SUPERSCRIPT TWO
|
| 228 |
+
'\xb3' # 0xB3 -> SUPERSCRIPT THREE
|
| 229 |
+
'\xb4' # 0xB4 -> ACUTE ACCENT
|
| 230 |
+
'\xb5' # 0xB5 -> MICRO SIGN
|
| 231 |
+
'\xb6' # 0xB6 -> PILCROW SIGN
|
| 232 |
+
'\xb7' # 0xB7 -> MIDDLE DOT
|
| 233 |
+
'\xb8' # 0xB8 -> CEDILLA
|
| 234 |
+
'\xb9' # 0xB9 -> SUPERSCRIPT ONE
|
| 235 |
+
'\xba' # 0xBA -> MASCULINE ORDINAL INDICATOR
|
| 236 |
+
'\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
| 237 |
+
'\xbc' # 0xBC -> VULGAR FRACTION ONE QUARTER
|
| 238 |
+
'\xbd' # 0xBD -> VULGAR FRACTION ONE HALF
|
| 239 |
+
'\xbe' # 0xBE -> VULGAR FRACTION THREE QUARTERS
|
| 240 |
+
'\xbf' # 0xBF -> INVERTED QUESTION MARK
|
| 241 |
+
'\xc0' # 0xC0 -> LATIN CAPITAL LETTER A WITH GRAVE
|
| 242 |
+
'\xc1' # 0xC1 -> LATIN CAPITAL LETTER A WITH ACUTE
|
| 243 |
+
'\xc2' # 0xC2 -> LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
| 244 |
+
'\xc3' # 0xC3 -> LATIN CAPITAL LETTER A WITH TILDE
|
| 245 |
+
'\xc4' # 0xC4 -> LATIN CAPITAL LETTER A WITH DIAERESIS
|
| 246 |
+
'\xc5' # 0xC5 -> LATIN CAPITAL LETTER A WITH RING ABOVE
|
| 247 |
+
'\xc6' # 0xC6 -> LATIN CAPITAL LETTER AE
|
| 248 |
+
'\xc7' # 0xC7 -> LATIN CAPITAL LETTER C WITH CEDILLA
|
| 249 |
+
'\xc8' # 0xC8 -> LATIN CAPITAL LETTER E WITH GRAVE
|
| 250 |
+
'\xc9' # 0xC9 -> LATIN CAPITAL LETTER E WITH ACUTE
|
| 251 |
+
'\xca' # 0xCA -> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
| 252 |
+
'\xcb' # 0xCB -> LATIN CAPITAL LETTER E WITH DIAERESIS
|
| 253 |
+
'\xcc' # 0xCC -> LATIN CAPITAL LETTER I WITH GRAVE
|
| 254 |
+
'\xcd' # 0xCD -> LATIN CAPITAL LETTER I WITH ACUTE
|
| 255 |
+
'\xce' # 0xCE -> LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
| 256 |
+
'\xcf' # 0xCF -> LATIN CAPITAL LETTER I WITH DIAERESIS
|
| 257 |
+
'\xd0' # 0xD0 -> LATIN CAPITAL LETTER ETH (Icelandic)
|
| 258 |
+
'\xd1' # 0xD1 -> LATIN CAPITAL LETTER N WITH TILDE
|
| 259 |
+
'\xd2' # 0xD2 -> LATIN CAPITAL LETTER O WITH GRAVE
|
| 260 |
+
'\xd3' # 0xD3 -> LATIN CAPITAL LETTER O WITH ACUTE
|
| 261 |
+
'\xd4' # 0xD4 -> LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
| 262 |
+
'\xd5' # 0xD5 -> LATIN CAPITAL LETTER O WITH TILDE
|
| 263 |
+
'\xd6' # 0xD6 -> LATIN CAPITAL LETTER O WITH DIAERESIS
|
| 264 |
+
'\xd7' # 0xD7 -> MULTIPLICATION SIGN
|
| 265 |
+
'\xd8' # 0xD8 -> LATIN CAPITAL LETTER O WITH STROKE
|
| 266 |
+
'\xd9' # 0xD9 -> LATIN CAPITAL LETTER U WITH GRAVE
|
| 267 |
+
'\xda' # 0xDA -> LATIN CAPITAL LETTER U WITH ACUTE
|
| 268 |
+
'\xdb' # 0xDB -> LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
| 269 |
+
'\xdc' # 0xDC -> LATIN CAPITAL LETTER U WITH DIAERESIS
|
| 270 |
+
'\xdd' # 0xDD -> LATIN CAPITAL LETTER Y WITH ACUTE
|
| 271 |
+
'\xde' # 0xDE -> LATIN CAPITAL LETTER THORN (Icelandic)
|
| 272 |
+
'\xdf' # 0xDF -> LATIN SMALL LETTER SHARP S (German)
|
| 273 |
+
'\xe0' # 0xE0 -> LATIN SMALL LETTER A WITH GRAVE
|
| 274 |
+
'\xe1' # 0xE1 -> LATIN SMALL LETTER A WITH ACUTE
|
| 275 |
+
'\xe2' # 0xE2 -> LATIN SMALL LETTER A WITH CIRCUMFLEX
|
| 276 |
+
'\xe3' # 0xE3 -> LATIN SMALL LETTER A WITH TILDE
|
| 277 |
+
'\xe4' # 0xE4 -> LATIN SMALL LETTER A WITH DIAERESIS
|
| 278 |
+
'\xe5' # 0xE5 -> LATIN SMALL LETTER A WITH RING ABOVE
|
| 279 |
+
'\xe6' # 0xE6 -> LATIN SMALL LETTER AE
|
| 280 |
+
'\xe7' # 0xE7 -> LATIN SMALL LETTER C WITH CEDILLA
|
| 281 |
+
'\xe8' # 0xE8 -> LATIN SMALL LETTER E WITH GRAVE
|
| 282 |
+
'\xe9' # 0xE9 -> LATIN SMALL LETTER E WITH ACUTE
|
| 283 |
+
'\xea' # 0xEA -> LATIN SMALL LETTER E WITH CIRCUMFLEX
|
| 284 |
+
'\xeb' # 0xEB -> LATIN SMALL LETTER E WITH DIAERESIS
|
| 285 |
+
'\xec' # 0xEC -> LATIN SMALL LETTER I WITH GRAVE
|
| 286 |
+
'\xed' # 0xED -> LATIN SMALL LETTER I WITH ACUTE
|
| 287 |
+
'\xee' # 0xEE -> LATIN SMALL LETTER I WITH CIRCUMFLEX
|
| 288 |
+
'\xef' # 0xEF -> LATIN SMALL LETTER I WITH DIAERESIS
|
| 289 |
+
'\xf0' # 0xF0 -> LATIN SMALL LETTER ETH (Icelandic)
|
| 290 |
+
'\xf1' # 0xF1 -> LATIN SMALL LETTER N WITH TILDE
|
| 291 |
+
'\xf2' # 0xF2 -> LATIN SMALL LETTER O WITH GRAVE
|
| 292 |
+
'\xf3' # 0xF3 -> LATIN SMALL LETTER O WITH ACUTE
|
| 293 |
+
'\xf4' # 0xF4 -> LATIN SMALL LETTER O WITH CIRCUMFLEX
|
| 294 |
+
'\xf5' # 0xF5 -> LATIN SMALL LETTER O WITH TILDE
|
| 295 |
+
'\xf6' # 0xF6 -> LATIN SMALL LETTER O WITH DIAERESIS
|
| 296 |
+
'\xf7' # 0xF7 -> DIVISION SIGN
|
| 297 |
+
'\xf8' # 0xF8 -> LATIN SMALL LETTER O WITH STROKE
|
| 298 |
+
'\xf9' # 0xF9 -> LATIN SMALL LETTER U WITH GRAVE
|
| 299 |
+
'\xfa' # 0xFA -> LATIN SMALL LETTER U WITH ACUTE
|
| 300 |
+
'\xfb' # 0xFB -> LATIN SMALL LETTER U WITH CIRCUMFLEX
|
| 301 |
+
'\xfc' # 0xFC -> LATIN SMALL LETTER U WITH DIAERESIS
|
| 302 |
+
'\xfd' # 0xFD -> LATIN SMALL LETTER Y WITH ACUTE
|
| 303 |
+
'\xfe' # 0xFE -> LATIN SMALL LETTER THORN (Icelandic)
|
| 304 |
+
'\xff' # 0xFF -> LATIN SMALL LETTER Y WITH DIAERESIS
|
| 305 |
+
)
|
| 306 |
+
|
| 307 |
+
### Encoding table
|
| 308 |
+
encoding_table=codecs.charmap_build(decoding_table)
|
pllava/lib/python3.10/encodings/rot_13.py
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
""" Python Character Mapping Codec for ROT13.
|
| 3 |
+
|
| 4 |
+
This codec de/encodes from str to str.
|
| 5 |
+
|
| 6 |
+
Written by Marc-Andre Lemburg (mal@lemburg.com).
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
import codecs
|
| 10 |
+
|
| 11 |
+
### Codec APIs
|
| 12 |
+
|
| 13 |
+
class Codec(codecs.Codec):
|
| 14 |
+
def encode(self, input, errors='strict'):
|
| 15 |
+
return (str.translate(input, rot13_map), len(input))
|
| 16 |
+
|
| 17 |
+
def decode(self, input, errors='strict'):
|
| 18 |
+
return (str.translate(input, rot13_map), len(input))
|
| 19 |
+
|
| 20 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 21 |
+
def encode(self, input, final=False):
|
| 22 |
+
return str.translate(input, rot13_map)
|
| 23 |
+
|
| 24 |
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
| 25 |
+
def decode(self, input, final=False):
|
| 26 |
+
return str.translate(input, rot13_map)
|
| 27 |
+
|
| 28 |
+
class StreamWriter(Codec,codecs.StreamWriter):
|
| 29 |
+
pass
|
| 30 |
+
|
| 31 |
+
class StreamReader(Codec,codecs.StreamReader):
|
| 32 |
+
pass
|
| 33 |
+
|
| 34 |
+
### encodings module API
|
| 35 |
+
|
| 36 |
+
def getregentry():
|
| 37 |
+
return codecs.CodecInfo(
|
| 38 |
+
name='rot-13',
|
| 39 |
+
encode=Codec().encode,
|
| 40 |
+
decode=Codec().decode,
|
| 41 |
+
incrementalencoder=IncrementalEncoder,
|
| 42 |
+
incrementaldecoder=IncrementalDecoder,
|
| 43 |
+
streamwriter=StreamWriter,
|
| 44 |
+
streamreader=StreamReader,
|
| 45 |
+
_is_text_encoding=False,
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
### Map
|
| 49 |
+
|
| 50 |
+
rot13_map = codecs.make_identity_dict(range(256))
|
| 51 |
+
rot13_map.update({
|
| 52 |
+
0x0041: 0x004e,
|
| 53 |
+
0x0042: 0x004f,
|
| 54 |
+
0x0043: 0x0050,
|
| 55 |
+
0x0044: 0x0051,
|
| 56 |
+
0x0045: 0x0052,
|
| 57 |
+
0x0046: 0x0053,
|
| 58 |
+
0x0047: 0x0054,
|
| 59 |
+
0x0048: 0x0055,
|
| 60 |
+
0x0049: 0x0056,
|
| 61 |
+
0x004a: 0x0057,
|
| 62 |
+
0x004b: 0x0058,
|
| 63 |
+
0x004c: 0x0059,
|
| 64 |
+
0x004d: 0x005a,
|
| 65 |
+
0x004e: 0x0041,
|
| 66 |
+
0x004f: 0x0042,
|
| 67 |
+
0x0050: 0x0043,
|
| 68 |
+
0x0051: 0x0044,
|
| 69 |
+
0x0052: 0x0045,
|
| 70 |
+
0x0053: 0x0046,
|
| 71 |
+
0x0054: 0x0047,
|
| 72 |
+
0x0055: 0x0048,
|
| 73 |
+
0x0056: 0x0049,
|
| 74 |
+
0x0057: 0x004a,
|
| 75 |
+
0x0058: 0x004b,
|
| 76 |
+
0x0059: 0x004c,
|
| 77 |
+
0x005a: 0x004d,
|
| 78 |
+
0x0061: 0x006e,
|
| 79 |
+
0x0062: 0x006f,
|
| 80 |
+
0x0063: 0x0070,
|
| 81 |
+
0x0064: 0x0071,
|
| 82 |
+
0x0065: 0x0072,
|
| 83 |
+
0x0066: 0x0073,
|
| 84 |
+
0x0067: 0x0074,
|
| 85 |
+
0x0068: 0x0075,
|
| 86 |
+
0x0069: 0x0076,
|
| 87 |
+
0x006a: 0x0077,
|
| 88 |
+
0x006b: 0x0078,
|
| 89 |
+
0x006c: 0x0079,
|
| 90 |
+
0x006d: 0x007a,
|
| 91 |
+
0x006e: 0x0061,
|
| 92 |
+
0x006f: 0x0062,
|
| 93 |
+
0x0070: 0x0063,
|
| 94 |
+
0x0071: 0x0064,
|
| 95 |
+
0x0072: 0x0065,
|
| 96 |
+
0x0073: 0x0066,
|
| 97 |
+
0x0074: 0x0067,
|
| 98 |
+
0x0075: 0x0068,
|
| 99 |
+
0x0076: 0x0069,
|
| 100 |
+
0x0077: 0x006a,
|
| 101 |
+
0x0078: 0x006b,
|
| 102 |
+
0x0079: 0x006c,
|
| 103 |
+
0x007a: 0x006d,
|
| 104 |
+
})
|
| 105 |
+
|
| 106 |
+
### Filter API
|
| 107 |
+
|
| 108 |
+
def rot13(infile, outfile):
|
| 109 |
+
outfile.write(codecs.encode(infile.read(), 'rot-13'))
|
| 110 |
+
|
| 111 |
+
if __name__ == '__main__':
|
| 112 |
+
import sys
|
| 113 |
+
rot13(sys.stdin, sys.stdout)
|
pllava/lib/python3.10/encodings/utf_32.py
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|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 9 |
+
|
| 10 |
+
def decode(input, errors='strict'):
|
| 11 |
+
return codecs.utf_32_decode(input, errors, True)
|
| 12 |
+
|
| 13 |
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
| 14 |
+
def __init__(self, errors='strict'):
|
| 15 |
+
codecs.IncrementalEncoder.__init__(self, errors)
|
| 16 |
+
self.encoder = None
|
| 17 |
+
|
| 18 |
+
def encode(self, input, final=False):
|
| 19 |
+
if self.encoder is None:
|
| 20 |
+
result = codecs.utf_32_encode(input, self.errors)[0]
|
| 21 |
+
if sys.byteorder == 'little':
|
| 22 |
+
self.encoder = codecs.utf_32_le_encode
|
| 23 |
+
else:
|
| 24 |
+
self.encoder = codecs.utf_32_be_encode
|
| 25 |
+
return result
|
| 26 |
+
return self.encoder(input, self.errors)[0]
|
| 27 |
+
|
| 28 |
+
def reset(self):
|
| 29 |
+
codecs.IncrementalEncoder.reset(self)
|
| 30 |
+
self.encoder = None
|
| 31 |
+
|
| 32 |
+
def getstate(self):
|
| 33 |
+
# state info we return to the caller:
|
| 34 |
+
# 0: stream is in natural order for this platform
|
| 35 |
+
# 2: endianness hasn't been determined yet
|
| 36 |
+
# (we're never writing in unnatural order)
|
| 37 |
+
return (2 if self.encoder is None else 0)
|
| 38 |
+
|
| 39 |
+
def setstate(self, state):
|
| 40 |
+
if state:
|
| 41 |
+
self.encoder = None
|
| 42 |
+
else:
|
| 43 |
+
if sys.byteorder == 'little':
|
| 44 |
+
self.encoder = codecs.utf_32_le_encode
|
| 45 |
+
else:
|
| 46 |
+
self.encoder = codecs.utf_32_be_encode
|
| 47 |
+
|
| 48 |
+
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
|
| 49 |
+
def __init__(self, errors='strict'):
|
| 50 |
+
codecs.BufferedIncrementalDecoder.__init__(self, errors)
|
| 51 |
+
self.decoder = None
|
| 52 |
+
|
| 53 |
+
def _buffer_decode(self, input, errors, final):
|
| 54 |
+
if self.decoder is None:
|
| 55 |
+
(output, consumed, byteorder) = \
|
| 56 |
+
codecs.utf_32_ex_decode(input, errors, 0, final)
|
| 57 |
+
if byteorder == -1:
|
| 58 |
+
self.decoder = codecs.utf_32_le_decode
|
| 59 |
+
elif byteorder == 1:
|
| 60 |
+
self.decoder = codecs.utf_32_be_decode
|
| 61 |
+
elif consumed >= 4:
|
| 62 |
+
raise UnicodeError("UTF-32 stream does not start with BOM")
|
| 63 |
+
return (output, consumed)
|
| 64 |
+
return self.decoder(input, self.errors, final)
|
| 65 |
+
|
| 66 |
+
def reset(self):
|
| 67 |
+
codecs.BufferedIncrementalDecoder.reset(self)
|
| 68 |
+
self.decoder = None
|
| 69 |
+
|
| 70 |
+
def getstate(self):
|
| 71 |
+
# additional state info from the base class must be None here,
|
| 72 |
+
# as it isn't passed along to the caller
|
| 73 |
+
state = codecs.BufferedIncrementalDecoder.getstate(self)[0]
|
| 74 |
+
# additional state info we pass to the caller:
|
| 75 |
+
# 0: stream is in natural order for this platform
|
| 76 |
+
# 1: stream is in unnatural order
|
| 77 |
+
# 2: endianness hasn't been determined yet
|
| 78 |
+
if self.decoder is None:
|
| 79 |
+
return (state, 2)
|
| 80 |
+
addstate = int((sys.byteorder == "big") !=
|
| 81 |
+
(self.decoder is codecs.utf_32_be_decode))
|
| 82 |
+
return (state, addstate)
|
| 83 |
+
|
| 84 |
+
def setstate(self, state):
|
| 85 |
+
# state[1] will be ignored by BufferedIncrementalDecoder.setstate()
|
| 86 |
+
codecs.BufferedIncrementalDecoder.setstate(self, state)
|
| 87 |
+
state = state[1]
|
| 88 |
+
if state == 0:
|
| 89 |
+
self.decoder = (codecs.utf_32_be_decode
|
| 90 |
+
if sys.byteorder == "big"
|
| 91 |
+
else codecs.utf_32_le_decode)
|
| 92 |
+
elif state == 1:
|
| 93 |
+
self.decoder = (codecs.utf_32_le_decode
|
| 94 |
+
if sys.byteorder == "big"
|
| 95 |
+
else codecs.utf_32_be_decode)
|
| 96 |
+
else:
|
| 97 |
+
self.decoder = None
|
| 98 |
+
|
| 99 |
+
class StreamWriter(codecs.StreamWriter):
|
| 100 |
+
def __init__(self, stream, errors='strict'):
|
| 101 |
+
self.encoder = None
|
| 102 |
+
codecs.StreamWriter.__init__(self, stream, errors)
|
| 103 |
+
|
| 104 |
+
def reset(self):
|
| 105 |
+
codecs.StreamWriter.reset(self)
|
| 106 |
+
self.encoder = None
|
| 107 |
+
|
| 108 |
+
def encode(self, input, errors='strict'):
|
| 109 |
+
if self.encoder is None:
|
| 110 |
+
result = codecs.utf_32_encode(input, errors)
|
| 111 |
+
if sys.byteorder == 'little':
|
| 112 |
+
self.encoder = codecs.utf_32_le_encode
|
| 113 |
+
else:
|
| 114 |
+
self.encoder = codecs.utf_32_be_encode
|
| 115 |
+
return result
|
| 116 |
+
else:
|
| 117 |
+
return self.encoder(input, errors)
|
| 118 |
+
|
| 119 |
+
class StreamReader(codecs.StreamReader):
|
| 120 |
+
|
| 121 |
+
def reset(self):
|
| 122 |
+
codecs.StreamReader.reset(self)
|
| 123 |
+
try:
|
| 124 |
+
del self.decode
|
| 125 |
+
except AttributeError:
|
| 126 |
+
pass
|
| 127 |
+
|
| 128 |
+
def decode(self, input, errors='strict'):
|
| 129 |
+
(object, consumed, byteorder) = \
|
| 130 |
+
codecs.utf_32_ex_decode(input, errors, 0, False)
|
| 131 |
+
if byteorder == -1:
|
| 132 |
+
self.decode = codecs.utf_32_le_decode
|
| 133 |
+
elif byteorder == 1:
|
| 134 |
+
self.decode = codecs.utf_32_be_decode
|
| 135 |
+
elif consumed>=4:
|
| 136 |
+
raise UnicodeError("UTF-32 stream does not start with BOM")
|
| 137 |
+
return (object, consumed)
|
| 138 |
+
|
| 139 |
+
### encodings module API
|
| 140 |
+
|
| 141 |
+
def getregentry():
|
| 142 |
+
return codecs.CodecInfo(
|
| 143 |
+
name='utf-32',
|
| 144 |
+
encode=encode,
|
| 145 |
+
decode=decode,
|
| 146 |
+
incrementalencoder=IncrementalEncoder,
|
| 147 |
+
incrementaldecoder=IncrementalDecoder,
|
| 148 |
+
streamreader=StreamReader,
|
| 149 |
+
streamwriter=StreamWriter,
|
| 150 |
+
)
|
pllava/lib/python3.10/idlelib/Icons/idle_32.gif
ADDED
|
|
Git LFS Details
|
pllava/lib/python3.10/idlelib/Icons/idle_32.png
ADDED
|
|
Git LFS Details
|
pllava/lib/python3.10/idlelib/__pycache__/autoexpand.cpython-310.pyc
ADDED
|
Binary file (3.1 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/calltip.cpython-310.pyc
ADDED
|
Binary file (6.06 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/calltip_w.cpython-310.pyc
ADDED
|
Binary file (6.2 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/codecontext.cpython-310.pyc
ADDED
|
Binary file (9.19 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/config_key.cpython-310.pyc
ADDED
|
Binary file (13.1 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/configdialog.cpython-310.pyc
ADDED
|
Binary file (80.4 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/debugger_r.cpython-310.pyc
ADDED
|
Binary file (13.8 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/debugobj.cpython-310.pyc
ADDED
|
Binary file (5.23 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/filelist.cpython-310.pyc
ADDED
|
Binary file (3.7 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/format.cpython-310.pyc
ADDED
|
Binary file (13.8 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/hyperparser.cpython-310.pyc
ADDED
|
Binary file (7.27 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/iomenu.cpython-310.pyc
ADDED
|
Binary file (12 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/macosx.cpython-310.pyc
ADDED
|
Binary file (8.05 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/pathbrowser.cpython-310.pyc
ADDED
|
Binary file (3.78 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/redirector.cpython-310.pyc
ADDED
|
Binary file (7.05 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/rpc.cpython-310.pyc
ADDED
|
Binary file (19.8 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/scrolledlist.cpython-310.pyc
ADDED
|
Binary file (5.31 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/search.cpython-310.pyc
ADDED
|
Binary file (5.93 kB). View file
|
|
|
pllava/lib/python3.10/idlelib/__pycache__/searchengine.cpython-310.pyc
ADDED
|
Binary file (7.03 kB). View file
|
|
|