com.googler.python 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/python3.4.2/lib/python3.4/site-packages/pip/__init__.py +1 -277
- package/python3.4.2/lib/python3.4/site-packages/pip/__main__.py +19 -7
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/__init__.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/basecommand.py +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/{baseparser.py → _internal/baseparser.py} +240 -224
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/build_env.py +92 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/cache.py +202 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/cmdoptions.py +609 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/__init__.py +79 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/check.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/completion.py +94 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/configuration.py +227 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/download.py +233 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/freeze.py +96 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/hash.py +57 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/{commands → _internal/commands}/help.py +36 -33
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/install.py +477 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/list.py +343 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/search.py +135 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/show.py +164 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/uninstall.py +71 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/wheel.py +179 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/compat.py +235 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/configuration.py +378 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/download.py +922 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/exceptions.py +249 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/index.py +1117 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/locations.py +194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/models/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/models/index.py +15 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/{_vendor/requests/packages/urllib3/contrib → _internal/operations}/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/check.py +106 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/freeze.py +252 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/prepare.py +378 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/pep425tags.py +317 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/__init__.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_file.py +338 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_install.py +1115 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_set.py +164 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_uninstall.py +455 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/resolve.py +354 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/{status_codes.py → _internal/status_codes.py} +8 -6
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/appdirs.py +258 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/deprecation.py +77 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/encoding.py +33 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/filesystem.py +28 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/glibc.py +84 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/hashes.py +94 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/logging.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/misc.py +851 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/outdated.py +163 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/packaging.py +70 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/setuptools_build.py +8 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/temp_dir.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/typing.py +29 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/ui.py +421 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/__init__.py +471 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/bazaar.py +113 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/git.py +311 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/mercurial.py +105 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/subversion.py +271 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/wheel.py +817 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/__init__.py +109 -8
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/appdirs.py +604 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/__init__.py +11 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/_cmd.py +60 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/adapter.py +134 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/cache.py +39 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +2 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +133 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +43 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/compat.py +29 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/controller.py +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/filewrapper.py +78 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/heuristics.py +138 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/serialize.py +194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/wrapper.py +27 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/__init__.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/__main__.py +2 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests → certifi}/cacert.pem +1765 -2358
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/core.py +37 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/__init__.py +39 -32
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/big5freq.py +386 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/big5prober.py +47 -42
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/chardistribution.py +233 -231
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/charsetgroupprober.py +106 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/charsetprober.py +145 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/cli/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/cli/chardetect.py +85 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/codingstatemachine.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/compat.py +34 -34
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/cp949prober.py +49 -44
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/enums.py +76 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/escprober.py +101 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/escsm.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/eucjpprober.py +92 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/euckrfreq.py +195 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euckrprober.py +47 -42
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euctwfreq.py +387 -428
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euctwprober.py +46 -41
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/gb2312freq.py +283 -472
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/gb2312prober.py +46 -41
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/hebrewprober.py +292 -283
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/jisfreq.py +325 -569
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/jpcntx.py +233 -219
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langbulgarianmodel.py +228 -229
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langcyrillicmodel.py +333 -329
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langgreekmodel.py +225 -225
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langhebrewmodel.py +200 -201
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langhungarianmodel.py +225 -225
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langthaimodel.py +199 -200
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/langturkishmodel.py +193 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/latin1prober.py +145 -139
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/mbcharsetprober.py +91 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/mbcsgroupprober.py +54 -54
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/mbcssm.py +572 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/sbcharsetprober.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/sbcsgroupprober.py +73 -69
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/sjisprober.py +92 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/universaldetector.py +286 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/utf8prober.py +82 -76
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/version.py +9 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/__init__.py +7 -7
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansi.py +102 -50
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py +236 -190
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/initialise.py +82 -56
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py +156 -137
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py +162 -120
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/__init__.py +23 -23
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -6
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -41
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py +761 -761
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -84
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +788 -788
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -2607
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/compat.py +1117 -1064
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/database.py +1318 -1301
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/index.py +516 -488
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/locators.py +1292 -1194
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/manifest.py +393 -364
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py +131 -190
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py +1068 -1026
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/resources.py +355 -317
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/scripts.py +415 -323
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/util.py +1755 -1575
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/version.py +736 -721
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py +984 -958
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distro.py +1104 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/__init__.py +35 -23
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{ihatexml.py → _ihatexml.py} +288 -285
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{inputstream.py → _inputstream.py} +923 -881
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{tokenizer.py → _tokenizer.py} +1721 -1731
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/__init__.py +14 -12
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/_base.py +37 -37
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/datrie.py +44 -44
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/py.py +67 -67
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{utils.py → _utils.py} +124 -82
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/constants.py +2947 -3104
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +29 -20
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/{_base.py → base.py} +12 -12
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +73 -65
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -93
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +207 -205
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +896 -12
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -38
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/html5parser.py +2791 -2713
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer.py +409 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +30 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +50 -44
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +88 -76
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/{_base.py → base.py} +417 -377
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +236 -227
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +340 -337
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +366 -369
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +154 -57
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{_base.py → base.py} +252 -200
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +43 -46
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +130 -138
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{lxmletree.py → etree_lxml.py} +213 -208
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{genshistream.py → genshi.py} +69 -69
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/__init__.py +2 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/codec.py +118 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/compat.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/core.py +387 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/idnadata.py +1585 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/intranges.py +53 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/package_data.py +2 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/uts46data.py +7634 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/ipaddress.py +2419 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/__init__.py +347 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/linklockfile.py +73 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/mkdirlockfile.py +84 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/pidlockfile.py +190 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/sqlitelockfile.py +156 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/symlinklockfile.py +70 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/__init__.py +66 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/_version.py +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/exceptions.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/fallback.py +971 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/__about__.py +21 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/__init__.py +14 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/_compat.py +30 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/_structures.py +70 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/markers.py +301 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py +130 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/specifiers.py +774 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/utils.py +63 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/version.py +441 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{pkg_resources.py → pkg_resources/__init__.py} +3125 -2762
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pkg_resources/py31compat.py +22 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/__init__.py +127 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/bar.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/counter.py +48 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/helpers.py +91 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/spinner.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pyparsing.py +5720 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/__init__.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/core.py +13 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/parser.py +374 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/writer.py +127 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py +123 -77
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__version__.py +14 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/_internal_utils.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/adapters.py +525 -388
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/api.py +152 -120
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/auth.py +293 -193
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/certs.py +18 -24
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/compat.py +73 -115
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cookies.py +542 -454
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/exceptions.py +122 -75
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/help.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py +34 -45
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/models.py +948 -803
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/sessions.py +737 -637
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/status_codes.py +91 -88
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/structures.py +105 -127
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/utils.py +904 -673
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/retrying.py +267 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/six.py +891 -646
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/__init__.py +97 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/_collections.py +319 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/connection.py +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/connectionpool.py +905 -710
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +593 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +343 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/appengine.py +296 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/contrib/ntlmpool.py +112 -120
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +455 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +810 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/socks.py +188 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/exceptions.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/fields.py +178 -177
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/filepost.py +94 -100
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/__init__.py +5 -4
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +53 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ordered_dict.py +259 -260
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/six.py +868 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ssl_match_hostname/__init__.py +19 -13
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ssl_match_hostname/_implementation.py +157 -105
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/poolmanager.py +440 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/request.py +148 -141
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/response.py +626 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/__init__.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/connection.py +130 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/request.py +118 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/response.py +81 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/retry.py +401 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/selectors.py +581 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/ssl_.py +341 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/util/timeout.py +242 -234
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/util/url.py +230 -162
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/wait.py +40 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/__init__.py +342 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/labels.py +231 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/mklabels.py +59 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/tests.py +153 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/x_user_defined.py +325 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +0 -16
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +0 -119
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +0 -271
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +0 -16
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +0 -320
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +0 -63
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +0 -34
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +0 -3
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +0 -925
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +0 -46
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +0 -106
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +0 -62
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +0 -61
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +0 -39
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +0 -86
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +0 -242
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +0 -90
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +0 -596
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +0 -86
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +0 -575
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +0 -120
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +0 -91
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +0 -170
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +0 -58
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +0 -205
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +0 -204
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +0 -422
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +0 -126
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +0 -385
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +0 -258
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +0 -308
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +0 -27
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +0 -45
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +0 -68
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +0 -13
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +0 -133
- package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +0 -138
- package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +0 -201
- package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +0 -371
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +0 -88
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +0 -42
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +0 -59
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +0 -114
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +0 -314
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +0 -162
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +0 -132
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +0 -80
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +0 -59
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +0 -7
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +0 -195
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +0 -351
- package/python3.4.2/lib/python3.4/site-packages/pip/download.py +0 -644
- package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +0 -46
- package/python3.4.2/lib/python3.4/site-packages/pip/index.py +0 -990
- package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +0 -171
- package/python3.4.2/lib/python3.4/site-packages/pip/log.py +0 -276
- package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +0 -102
- package/python3.4.2/lib/python3.4/site-packages/pip/req.py +0 -1931
- package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +0 -18
- package/python3.4.2/lib/python3.4/site-packages/pip/util.py +0 -720
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +0 -251
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +0 -131
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +0 -194
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +0 -151
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +0 -273
- package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +0 -560
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
|
2
|
+
# The Original Code is mozilla.org code.
|
|
3
|
+
#
|
|
4
|
+
# The Initial Developer of the Original Code is
|
|
5
|
+
# Netscape Communications Corporation.
|
|
6
|
+
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
7
|
+
# the Initial Developer. All Rights Reserved.
|
|
8
|
+
#
|
|
9
|
+
# Contributor(s):
|
|
10
|
+
# Mark Pilgrim - port to Python
|
|
11
|
+
#
|
|
12
|
+
# This library is free software; you can redistribute it and/or
|
|
13
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
14
|
+
# License as published by the Free Software Foundation; either
|
|
15
|
+
# version 2.1 of the License, or (at your option) any later version.
|
|
16
|
+
#
|
|
17
|
+
# This library is distributed in the hope that it will be useful,
|
|
18
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
20
|
+
# Lesser General Public License for more details.
|
|
21
|
+
#
|
|
22
|
+
# You should have received a copy of the GNU Lesser General Public
|
|
23
|
+
# License along with this library; if not, write to the Free Software
|
|
24
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
25
|
+
# 02110-1301 USA
|
|
26
|
+
######################### END LICENSE BLOCK #########################
|
|
27
|
+
|
|
28
|
+
from .enums import MachineState
|
|
29
|
+
|
|
30
|
+
HZ_CLS = (
|
|
31
|
+
1,0,0,0,0,0,0,0, # 00 - 07
|
|
32
|
+
0,0,0,0,0,0,0,0, # 08 - 0f
|
|
33
|
+
0,0,0,0,0,0,0,0, # 10 - 17
|
|
34
|
+
0,0,0,1,0,0,0,0, # 18 - 1f
|
|
35
|
+
0,0,0,0,0,0,0,0, # 20 - 27
|
|
36
|
+
0,0,0,0,0,0,0,0, # 28 - 2f
|
|
37
|
+
0,0,0,0,0,0,0,0, # 30 - 37
|
|
38
|
+
0,0,0,0,0,0,0,0, # 38 - 3f
|
|
39
|
+
0,0,0,0,0,0,0,0, # 40 - 47
|
|
40
|
+
0,0,0,0,0,0,0,0, # 48 - 4f
|
|
41
|
+
0,0,0,0,0,0,0,0, # 50 - 57
|
|
42
|
+
0,0,0,0,0,0,0,0, # 58 - 5f
|
|
43
|
+
0,0,0,0,0,0,0,0, # 60 - 67
|
|
44
|
+
0,0,0,0,0,0,0,0, # 68 - 6f
|
|
45
|
+
0,0,0,0,0,0,0,0, # 70 - 77
|
|
46
|
+
0,0,0,4,0,5,2,0, # 78 - 7f
|
|
47
|
+
1,1,1,1,1,1,1,1, # 80 - 87
|
|
48
|
+
1,1,1,1,1,1,1,1, # 88 - 8f
|
|
49
|
+
1,1,1,1,1,1,1,1, # 90 - 97
|
|
50
|
+
1,1,1,1,1,1,1,1, # 98 - 9f
|
|
51
|
+
1,1,1,1,1,1,1,1, # a0 - a7
|
|
52
|
+
1,1,1,1,1,1,1,1, # a8 - af
|
|
53
|
+
1,1,1,1,1,1,1,1, # b0 - b7
|
|
54
|
+
1,1,1,1,1,1,1,1, # b8 - bf
|
|
55
|
+
1,1,1,1,1,1,1,1, # c0 - c7
|
|
56
|
+
1,1,1,1,1,1,1,1, # c8 - cf
|
|
57
|
+
1,1,1,1,1,1,1,1, # d0 - d7
|
|
58
|
+
1,1,1,1,1,1,1,1, # d8 - df
|
|
59
|
+
1,1,1,1,1,1,1,1, # e0 - e7
|
|
60
|
+
1,1,1,1,1,1,1,1, # e8 - ef
|
|
61
|
+
1,1,1,1,1,1,1,1, # f0 - f7
|
|
62
|
+
1,1,1,1,1,1,1,1, # f8 - ff
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
HZ_ST = (
|
|
66
|
+
MachineState.START,MachineState.ERROR, 3,MachineState.START,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,# 00-07
|
|
67
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,# 08-0f
|
|
68
|
+
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.START,MachineState.START, 4,MachineState.ERROR,# 10-17
|
|
69
|
+
5,MachineState.ERROR, 6,MachineState.ERROR, 5, 5, 4,MachineState.ERROR,# 18-1f
|
|
70
|
+
4,MachineState.ERROR, 4, 4, 4,MachineState.ERROR, 4,MachineState.ERROR,# 20-27
|
|
71
|
+
4,MachineState.ITS_ME,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,# 28-2f
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
HZ_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0)
|
|
75
|
+
|
|
76
|
+
HZ_SM_MODEL = {'class_table': HZ_CLS,
|
|
77
|
+
'class_factor': 6,
|
|
78
|
+
'state_table': HZ_ST,
|
|
79
|
+
'char_len_table': HZ_CHAR_LEN_TABLE,
|
|
80
|
+
'name': "HZ-GB-2312",
|
|
81
|
+
'language': 'Chinese'}
|
|
82
|
+
|
|
83
|
+
ISO2022CN_CLS = (
|
|
84
|
+
2,0,0,0,0,0,0,0, # 00 - 07
|
|
85
|
+
0,0,0,0,0,0,0,0, # 08 - 0f
|
|
86
|
+
0,0,0,0,0,0,0,0, # 10 - 17
|
|
87
|
+
0,0,0,1,0,0,0,0, # 18 - 1f
|
|
88
|
+
0,0,0,0,0,0,0,0, # 20 - 27
|
|
89
|
+
0,3,0,0,0,0,0,0, # 28 - 2f
|
|
90
|
+
0,0,0,0,0,0,0,0, # 30 - 37
|
|
91
|
+
0,0,0,0,0,0,0,0, # 38 - 3f
|
|
92
|
+
0,0,0,4,0,0,0,0, # 40 - 47
|
|
93
|
+
0,0,0,0,0,0,0,0, # 48 - 4f
|
|
94
|
+
0,0,0,0,0,0,0,0, # 50 - 57
|
|
95
|
+
0,0,0,0,0,0,0,0, # 58 - 5f
|
|
96
|
+
0,0,0,0,0,0,0,0, # 60 - 67
|
|
97
|
+
0,0,0,0,0,0,0,0, # 68 - 6f
|
|
98
|
+
0,0,0,0,0,0,0,0, # 70 - 77
|
|
99
|
+
0,0,0,0,0,0,0,0, # 78 - 7f
|
|
100
|
+
2,2,2,2,2,2,2,2, # 80 - 87
|
|
101
|
+
2,2,2,2,2,2,2,2, # 88 - 8f
|
|
102
|
+
2,2,2,2,2,2,2,2, # 90 - 97
|
|
103
|
+
2,2,2,2,2,2,2,2, # 98 - 9f
|
|
104
|
+
2,2,2,2,2,2,2,2, # a0 - a7
|
|
105
|
+
2,2,2,2,2,2,2,2, # a8 - af
|
|
106
|
+
2,2,2,2,2,2,2,2, # b0 - b7
|
|
107
|
+
2,2,2,2,2,2,2,2, # b8 - bf
|
|
108
|
+
2,2,2,2,2,2,2,2, # c0 - c7
|
|
109
|
+
2,2,2,2,2,2,2,2, # c8 - cf
|
|
110
|
+
2,2,2,2,2,2,2,2, # d0 - d7
|
|
111
|
+
2,2,2,2,2,2,2,2, # d8 - df
|
|
112
|
+
2,2,2,2,2,2,2,2, # e0 - e7
|
|
113
|
+
2,2,2,2,2,2,2,2, # e8 - ef
|
|
114
|
+
2,2,2,2,2,2,2,2, # f0 - f7
|
|
115
|
+
2,2,2,2,2,2,2,2, # f8 - ff
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
ISO2022CN_ST = (
|
|
119
|
+
MachineState.START, 3,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,# 00-07
|
|
120
|
+
MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,# 08-0f
|
|
121
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,# 10-17
|
|
122
|
+
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 4,MachineState.ERROR,# 18-1f
|
|
123
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,# 20-27
|
|
124
|
+
5, 6,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,# 28-2f
|
|
125
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,# 30-37
|
|
126
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,MachineState.START,# 38-3f
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
ISO2022CN_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
130
|
+
|
|
131
|
+
ISO2022CN_SM_MODEL = {'class_table': ISO2022CN_CLS,
|
|
132
|
+
'class_factor': 9,
|
|
133
|
+
'state_table': ISO2022CN_ST,
|
|
134
|
+
'char_len_table': ISO2022CN_CHAR_LEN_TABLE,
|
|
135
|
+
'name': "ISO-2022-CN",
|
|
136
|
+
'language': 'Chinese'}
|
|
137
|
+
|
|
138
|
+
ISO2022JP_CLS = (
|
|
139
|
+
2,0,0,0,0,0,0,0, # 00 - 07
|
|
140
|
+
0,0,0,0,0,0,2,2, # 08 - 0f
|
|
141
|
+
0,0,0,0,0,0,0,0, # 10 - 17
|
|
142
|
+
0,0,0,1,0,0,0,0, # 18 - 1f
|
|
143
|
+
0,0,0,0,7,0,0,0, # 20 - 27
|
|
144
|
+
3,0,0,0,0,0,0,0, # 28 - 2f
|
|
145
|
+
0,0,0,0,0,0,0,0, # 30 - 37
|
|
146
|
+
0,0,0,0,0,0,0,0, # 38 - 3f
|
|
147
|
+
6,0,4,0,8,0,0,0, # 40 - 47
|
|
148
|
+
0,9,5,0,0,0,0,0, # 48 - 4f
|
|
149
|
+
0,0,0,0,0,0,0,0, # 50 - 57
|
|
150
|
+
0,0,0,0,0,0,0,0, # 58 - 5f
|
|
151
|
+
0,0,0,0,0,0,0,0, # 60 - 67
|
|
152
|
+
0,0,0,0,0,0,0,0, # 68 - 6f
|
|
153
|
+
0,0,0,0,0,0,0,0, # 70 - 77
|
|
154
|
+
0,0,0,0,0,0,0,0, # 78 - 7f
|
|
155
|
+
2,2,2,2,2,2,2,2, # 80 - 87
|
|
156
|
+
2,2,2,2,2,2,2,2, # 88 - 8f
|
|
157
|
+
2,2,2,2,2,2,2,2, # 90 - 97
|
|
158
|
+
2,2,2,2,2,2,2,2, # 98 - 9f
|
|
159
|
+
2,2,2,2,2,2,2,2, # a0 - a7
|
|
160
|
+
2,2,2,2,2,2,2,2, # a8 - af
|
|
161
|
+
2,2,2,2,2,2,2,2, # b0 - b7
|
|
162
|
+
2,2,2,2,2,2,2,2, # b8 - bf
|
|
163
|
+
2,2,2,2,2,2,2,2, # c0 - c7
|
|
164
|
+
2,2,2,2,2,2,2,2, # c8 - cf
|
|
165
|
+
2,2,2,2,2,2,2,2, # d0 - d7
|
|
166
|
+
2,2,2,2,2,2,2,2, # d8 - df
|
|
167
|
+
2,2,2,2,2,2,2,2, # e0 - e7
|
|
168
|
+
2,2,2,2,2,2,2,2, # e8 - ef
|
|
169
|
+
2,2,2,2,2,2,2,2, # f0 - f7
|
|
170
|
+
2,2,2,2,2,2,2,2, # f8 - ff
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
ISO2022JP_ST = (
|
|
174
|
+
MachineState.START, 3,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.START,MachineState.START,# 00-07
|
|
175
|
+
MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,# 08-0f
|
|
176
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,# 10-17
|
|
177
|
+
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,# 18-1f
|
|
178
|
+
MachineState.ERROR, 5,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 4,MachineState.ERROR,MachineState.ERROR,# 20-27
|
|
179
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 6,MachineState.ITS_ME,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,# 28-2f
|
|
180
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,# 30-37
|
|
181
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,# 38-3f
|
|
182
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ERROR,MachineState.START,MachineState.START,# 40-47
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
ISO2022JP_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
186
|
+
|
|
187
|
+
ISO2022JP_SM_MODEL = {'class_table': ISO2022JP_CLS,
|
|
188
|
+
'class_factor': 10,
|
|
189
|
+
'state_table': ISO2022JP_ST,
|
|
190
|
+
'char_len_table': ISO2022JP_CHAR_LEN_TABLE,
|
|
191
|
+
'name': "ISO-2022-JP",
|
|
192
|
+
'language': 'Japanese'}
|
|
193
|
+
|
|
194
|
+
ISO2022KR_CLS = (
|
|
195
|
+
2,0,0,0,0,0,0,0, # 00 - 07
|
|
196
|
+
0,0,0,0,0,0,0,0, # 08 - 0f
|
|
197
|
+
0,0,0,0,0,0,0,0, # 10 - 17
|
|
198
|
+
0,0,0,1,0,0,0,0, # 18 - 1f
|
|
199
|
+
0,0,0,0,3,0,0,0, # 20 - 27
|
|
200
|
+
0,4,0,0,0,0,0,0, # 28 - 2f
|
|
201
|
+
0,0,0,0,0,0,0,0, # 30 - 37
|
|
202
|
+
0,0,0,0,0,0,0,0, # 38 - 3f
|
|
203
|
+
0,0,0,5,0,0,0,0, # 40 - 47
|
|
204
|
+
0,0,0,0,0,0,0,0, # 48 - 4f
|
|
205
|
+
0,0,0,0,0,0,0,0, # 50 - 57
|
|
206
|
+
0,0,0,0,0,0,0,0, # 58 - 5f
|
|
207
|
+
0,0,0,0,0,0,0,0, # 60 - 67
|
|
208
|
+
0,0,0,0,0,0,0,0, # 68 - 6f
|
|
209
|
+
0,0,0,0,0,0,0,0, # 70 - 77
|
|
210
|
+
0,0,0,0,0,0,0,0, # 78 - 7f
|
|
211
|
+
2,2,2,2,2,2,2,2, # 80 - 87
|
|
212
|
+
2,2,2,2,2,2,2,2, # 88 - 8f
|
|
213
|
+
2,2,2,2,2,2,2,2, # 90 - 97
|
|
214
|
+
2,2,2,2,2,2,2,2, # 98 - 9f
|
|
215
|
+
2,2,2,2,2,2,2,2, # a0 - a7
|
|
216
|
+
2,2,2,2,2,2,2,2, # a8 - af
|
|
217
|
+
2,2,2,2,2,2,2,2, # b0 - b7
|
|
218
|
+
2,2,2,2,2,2,2,2, # b8 - bf
|
|
219
|
+
2,2,2,2,2,2,2,2, # c0 - c7
|
|
220
|
+
2,2,2,2,2,2,2,2, # c8 - cf
|
|
221
|
+
2,2,2,2,2,2,2,2, # d0 - d7
|
|
222
|
+
2,2,2,2,2,2,2,2, # d8 - df
|
|
223
|
+
2,2,2,2,2,2,2,2, # e0 - e7
|
|
224
|
+
2,2,2,2,2,2,2,2, # e8 - ef
|
|
225
|
+
2,2,2,2,2,2,2,2, # f0 - f7
|
|
226
|
+
2,2,2,2,2,2,2,2, # f8 - ff
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
ISO2022KR_ST = (
|
|
230
|
+
MachineState.START, 3,MachineState.ERROR,MachineState.START,MachineState.START,MachineState.START,MachineState.ERROR,MachineState.ERROR,# 00-07
|
|
231
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ITS_ME,# 08-0f
|
|
232
|
+
MachineState.ITS_ME,MachineState.ITS_ME,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 4,MachineState.ERROR,MachineState.ERROR,# 10-17
|
|
233
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR, 5,MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,# 18-1f
|
|
234
|
+
MachineState.ERROR,MachineState.ERROR,MachineState.ERROR,MachineState.ITS_ME,MachineState.START,MachineState.START,MachineState.START,MachineState.START,# 20-27
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
ISO2022KR_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0)
|
|
238
|
+
|
|
239
|
+
ISO2022KR_SM_MODEL = {'class_table': ISO2022KR_CLS,
|
|
240
|
+
'class_factor': 6,
|
|
241
|
+
'state_table': ISO2022KR_ST,
|
|
242
|
+
'char_len_table': ISO2022KR_CHAR_LEN_TABLE,
|
|
243
|
+
'name': "ISO-2022-KR",
|
|
244
|
+
'language': 'Korean'}
|
|
245
|
+
|
|
246
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
|
2
|
+
# The Original Code is mozilla.org code.
|
|
3
|
+
#
|
|
4
|
+
# The Initial Developer of the Original Code is
|
|
5
|
+
# Netscape Communications Corporation.
|
|
6
|
+
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
7
|
+
# the Initial Developer. All Rights Reserved.
|
|
8
|
+
#
|
|
9
|
+
# Contributor(s):
|
|
10
|
+
# Mark Pilgrim - port to Python
|
|
11
|
+
#
|
|
12
|
+
# This library is free software; you can redistribute it and/or
|
|
13
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
14
|
+
# License as published by the Free Software Foundation; either
|
|
15
|
+
# version 2.1 of the License, or (at your option) any later version.
|
|
16
|
+
#
|
|
17
|
+
# This library is distributed in the hope that it will be useful,
|
|
18
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
20
|
+
# Lesser General Public License for more details.
|
|
21
|
+
#
|
|
22
|
+
# You should have received a copy of the GNU Lesser General Public
|
|
23
|
+
# License along with this library; if not, write to the Free Software
|
|
24
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
25
|
+
# 02110-1301 USA
|
|
26
|
+
######################### END LICENSE BLOCK #########################
|
|
27
|
+
|
|
28
|
+
from .enums import ProbingState, MachineState
|
|
29
|
+
from .mbcharsetprober import MultiByteCharSetProber
|
|
30
|
+
from .codingstatemachine import CodingStateMachine
|
|
31
|
+
from .chardistribution import EUCJPDistributionAnalysis
|
|
32
|
+
from .jpcntx import EUCJPContextAnalysis
|
|
33
|
+
from .mbcssm import EUCJP_SM_MODEL
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class EUCJPProber(MultiByteCharSetProber):
|
|
37
|
+
def __init__(self):
|
|
38
|
+
super(EUCJPProber, self).__init__()
|
|
39
|
+
self.coding_sm = CodingStateMachine(EUCJP_SM_MODEL)
|
|
40
|
+
self.distribution_analyzer = EUCJPDistributionAnalysis()
|
|
41
|
+
self.context_analyzer = EUCJPContextAnalysis()
|
|
42
|
+
self.reset()
|
|
43
|
+
|
|
44
|
+
def reset(self):
|
|
45
|
+
super(EUCJPProber, self).reset()
|
|
46
|
+
self.context_analyzer.reset()
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def charset_name(self):
|
|
50
|
+
return "EUC-JP"
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def language(self):
|
|
54
|
+
return "Japanese"
|
|
55
|
+
|
|
56
|
+
def feed(self, byte_str):
|
|
57
|
+
for i in range(len(byte_str)):
|
|
58
|
+
# PY3K: byte_str is a byte array, so byte_str[i] is an int, not a byte
|
|
59
|
+
coding_state = self.coding_sm.next_state(byte_str[i])
|
|
60
|
+
if coding_state == MachineState.ERROR:
|
|
61
|
+
self.logger.debug('%s %s prober hit error at byte %s',
|
|
62
|
+
self.charset_name, self.language, i)
|
|
63
|
+
self._state = ProbingState.NOT_ME
|
|
64
|
+
break
|
|
65
|
+
elif coding_state == MachineState.ITS_ME:
|
|
66
|
+
self._state = ProbingState.FOUND_IT
|
|
67
|
+
break
|
|
68
|
+
elif coding_state == MachineState.START:
|
|
69
|
+
char_len = self.coding_sm.get_current_charlen()
|
|
70
|
+
if i == 0:
|
|
71
|
+
self._last_char[1] = byte_str[0]
|
|
72
|
+
self.context_analyzer.feed(self._last_char, char_len)
|
|
73
|
+
self.distribution_analyzer.feed(self._last_char, char_len)
|
|
74
|
+
else:
|
|
75
|
+
self.context_analyzer.feed(byte_str[i - 1:i + 1],
|
|
76
|
+
char_len)
|
|
77
|
+
self.distribution_analyzer.feed(byte_str[i - 1:i + 1],
|
|
78
|
+
char_len)
|
|
79
|
+
|
|
80
|
+
self._last_char[0] = byte_str[-1]
|
|
81
|
+
|
|
82
|
+
if self.state == ProbingState.DETECTING:
|
|
83
|
+
if (self.context_analyzer.got_enough_data() and
|
|
84
|
+
(self.get_confidence() > self.SHORTCUT_THRESHOLD)):
|
|
85
|
+
self._state = ProbingState.FOUND_IT
|
|
86
|
+
|
|
87
|
+
return self.state
|
|
88
|
+
|
|
89
|
+
def get_confidence(self):
|
|
90
|
+
context_conf = self.context_analyzer.get_confidence()
|
|
91
|
+
distrib_conf = self.distribution_analyzer.get_confidence()
|
|
92
|
+
return max(context_conf, distrib_conf)
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
|
2
|
+
# The Original Code is Mozilla Communicator client code.
|
|
3
|
+
#
|
|
4
|
+
# The Initial Developer of the Original Code is
|
|
5
|
+
# Netscape Communications Corporation.
|
|
6
|
+
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
7
|
+
# the Initial Developer. All Rights Reserved.
|
|
8
|
+
#
|
|
9
|
+
# Contributor(s):
|
|
10
|
+
# Mark Pilgrim - port to Python
|
|
11
|
+
#
|
|
12
|
+
# This library is free software; you can redistribute it and/or
|
|
13
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
14
|
+
# License as published by the Free Software Foundation; either
|
|
15
|
+
# version 2.1 of the License, or (at your option) any later version.
|
|
16
|
+
#
|
|
17
|
+
# This library is distributed in the hope that it will be useful,
|
|
18
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
20
|
+
# Lesser General Public License for more details.
|
|
21
|
+
#
|
|
22
|
+
# You should have received a copy of the GNU Lesser General Public
|
|
23
|
+
# License along with this library; if not, write to the Free Software
|
|
24
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
25
|
+
# 02110-1301 USA
|
|
26
|
+
######################### END LICENSE BLOCK #########################
|
|
27
|
+
|
|
28
|
+
# Sampling from about 20M text materials include literature and computer technology
|
|
29
|
+
|
|
30
|
+
# 128 --> 0.79
|
|
31
|
+
# 256 --> 0.92
|
|
32
|
+
# 512 --> 0.986
|
|
33
|
+
# 1024 --> 0.99944
|
|
34
|
+
# 2048 --> 0.99999
|
|
35
|
+
#
|
|
36
|
+
# Idea Distribution Ratio = 0.98653 / (1-0.98653) = 73.24
|
|
37
|
+
# Random Distribution Ration = 512 / (2350-512) = 0.279.
|
|
38
|
+
#
|
|
39
|
+
# Typical Distribution Ratio
|
|
40
|
+
|
|
41
|
+
EUCKR_TYPICAL_DISTRIBUTION_RATIO = 6.0
|
|
42
|
+
|
|
43
|
+
EUCKR_TABLE_SIZE = 2352
|
|
44
|
+
|
|
45
|
+
# Char to FreqOrder table ,
|
|
46
|
+
EUCKR_CHAR_TO_FREQ_ORDER = (
|
|
47
|
+
13, 130, 120,1396, 481,1719,1720, 328, 609, 212,1721, 707, 400, 299,1722, 87,
|
|
48
|
+
1397,1723, 104, 536,1117,1203,1724,1267, 685,1268, 508,1725,1726,1727,1728,1398,
|
|
49
|
+
1399,1729,1730,1731, 141, 621, 326,1057, 368,1732, 267, 488, 20,1733,1269,1734,
|
|
50
|
+
945,1400,1735, 47, 904,1270,1736,1737, 773, 248,1738, 409, 313, 786, 429,1739,
|
|
51
|
+
116, 987, 813,1401, 683, 75,1204, 145,1740,1741,1742,1743, 16, 847, 667, 622,
|
|
52
|
+
708,1744,1745,1746, 966, 787, 304, 129,1747, 60, 820, 123, 676,1748,1749,1750,
|
|
53
|
+
1751, 617,1752, 626,1753,1754,1755,1756, 653,1757,1758,1759,1760,1761,1762, 856,
|
|
54
|
+
344,1763,1764,1765,1766, 89, 401, 418, 806, 905, 848,1767,1768,1769, 946,1205,
|
|
55
|
+
709,1770,1118,1771, 241,1772,1773,1774,1271,1775, 569,1776, 999,1777,1778,1779,
|
|
56
|
+
1780, 337, 751,1058, 28, 628, 254,1781, 177, 906, 270, 349, 891,1079,1782, 19,
|
|
57
|
+
1783, 379,1784, 315,1785, 629, 754,1402, 559,1786, 636, 203,1206,1787, 710, 567,
|
|
58
|
+
1788, 935, 814,1789,1790,1207, 766, 528,1791,1792,1208,1793,1794,1795,1796,1797,
|
|
59
|
+
1403,1798,1799, 533,1059,1404,1405,1156,1406, 936, 884,1080,1800, 351,1801,1802,
|
|
60
|
+
1803,1804,1805, 801,1806,1807,1808,1119,1809,1157, 714, 474,1407,1810, 298, 899,
|
|
61
|
+
885,1811,1120, 802,1158,1812, 892,1813,1814,1408, 659,1815,1816,1121,1817,1818,
|
|
62
|
+
1819,1820,1821,1822, 319,1823, 594, 545,1824, 815, 937,1209,1825,1826, 573,1409,
|
|
63
|
+
1022,1827,1210,1828,1829,1830,1831,1832,1833, 556, 722, 807,1122,1060,1834, 697,
|
|
64
|
+
1835, 900, 557, 715,1836,1410, 540,1411, 752,1159, 294, 597,1211, 976, 803, 770,
|
|
65
|
+
1412,1837,1838, 39, 794,1413, 358,1839, 371, 925,1840, 453, 661, 788, 531, 723,
|
|
66
|
+
544,1023,1081, 869, 91,1841, 392, 430, 790, 602,1414, 677,1082, 457,1415,1416,
|
|
67
|
+
1842,1843, 475, 327,1024,1417, 795, 121,1844, 733, 403,1418,1845,1846,1847, 300,
|
|
68
|
+
119, 711,1212, 627,1848,1272, 207,1849,1850, 796,1213, 382,1851, 519,1852,1083,
|
|
69
|
+
893,1853,1854,1855, 367, 809, 487, 671,1856, 663,1857,1858, 956, 471, 306, 857,
|
|
70
|
+
1859,1860,1160,1084,1861,1862,1863,1864,1865,1061,1866,1867,1868,1869,1870,1871,
|
|
71
|
+
282, 96, 574,1872, 502,1085,1873,1214,1874, 907,1875,1876, 827, 977,1419,1420,
|
|
72
|
+
1421, 268,1877,1422,1878,1879,1880, 308,1881, 2, 537,1882,1883,1215,1884,1885,
|
|
73
|
+
127, 791,1886,1273,1423,1887, 34, 336, 404, 643,1888, 571, 654, 894, 840,1889,
|
|
74
|
+
0, 886,1274, 122, 575, 260, 908, 938,1890,1275, 410, 316,1891,1892, 100,1893,
|
|
75
|
+
1894,1123, 48,1161,1124,1025,1895, 633, 901,1276,1896,1897, 115, 816,1898, 317,
|
|
76
|
+
1899, 694,1900, 909, 734,1424, 572, 866,1425, 691, 85, 524,1010, 543, 394, 841,
|
|
77
|
+
1901,1902,1903,1026,1904,1905,1906,1907,1908,1909, 30, 451, 651, 988, 310,1910,
|
|
78
|
+
1911,1426, 810,1216, 93,1912,1913,1277,1217,1914, 858, 759, 45, 58, 181, 610,
|
|
79
|
+
269,1915,1916, 131,1062, 551, 443,1000, 821,1427, 957, 895,1086,1917,1918, 375,
|
|
80
|
+
1919, 359,1920, 687,1921, 822,1922, 293,1923,1924, 40, 662, 118, 692, 29, 939,
|
|
81
|
+
887, 640, 482, 174,1925, 69,1162, 728,1428, 910,1926,1278,1218,1279, 386, 870,
|
|
82
|
+
217, 854,1163, 823,1927,1928,1929,1930, 834,1931, 78,1932, 859,1933,1063,1934,
|
|
83
|
+
1935,1936,1937, 438,1164, 208, 595,1938,1939,1940,1941,1219,1125,1942, 280, 888,
|
|
84
|
+
1429,1430,1220,1431,1943,1944,1945,1946,1947,1280, 150, 510,1432,1948,1949,1950,
|
|
85
|
+
1951,1952,1953,1954,1011,1087,1955,1433,1043,1956, 881,1957, 614, 958,1064,1065,
|
|
86
|
+
1221,1958, 638,1001, 860, 967, 896,1434, 989, 492, 553,1281,1165,1959,1282,1002,
|
|
87
|
+
1283,1222,1960,1961,1962,1963, 36, 383, 228, 753, 247, 454,1964, 876, 678,1965,
|
|
88
|
+
1966,1284, 126, 464, 490, 835, 136, 672, 529, 940,1088,1435, 473,1967,1968, 467,
|
|
89
|
+
50, 390, 227, 587, 279, 378, 598, 792, 968, 240, 151, 160, 849, 882,1126,1285,
|
|
90
|
+
639,1044, 133, 140, 288, 360, 811, 563,1027, 561, 142, 523,1969,1970,1971, 7,
|
|
91
|
+
103, 296, 439, 407, 506, 634, 990,1972,1973,1974,1975, 645,1976,1977,1978,1979,
|
|
92
|
+
1980,1981, 236,1982,1436,1983,1984,1089, 192, 828, 618, 518,1166, 333,1127,1985,
|
|
93
|
+
818,1223,1986,1987,1988,1989,1990,1991,1992,1993, 342,1128,1286, 746, 842,1994,
|
|
94
|
+
1995, 560, 223,1287, 98, 8, 189, 650, 978,1288,1996,1437,1997, 17, 345, 250,
|
|
95
|
+
423, 277, 234, 512, 226, 97, 289, 42, 167,1998, 201,1999,2000, 843, 836, 824,
|
|
96
|
+
532, 338, 783,1090, 182, 576, 436,1438,1439, 527, 500,2001, 947, 889,2002,2003,
|
|
97
|
+
2004,2005, 262, 600, 314, 447,2006, 547,2007, 693, 738,1129,2008, 71,1440, 745,
|
|
98
|
+
619, 688,2009, 829,2010,2011, 147,2012, 33, 948,2013,2014, 74, 224,2015, 61,
|
|
99
|
+
191, 918, 399, 637,2016,1028,1130, 257, 902,2017,2018,2019,2020,2021,2022,2023,
|
|
100
|
+
2024,2025,2026, 837,2027,2028,2029,2030, 179, 874, 591, 52, 724, 246,2031,2032,
|
|
101
|
+
2033,2034,1167, 969,2035,1289, 630, 605, 911,1091,1168,2036,2037,2038,1441, 912,
|
|
102
|
+
2039, 623,2040,2041, 253,1169,1290,2042,1442, 146, 620, 611, 577, 433,2043,1224,
|
|
103
|
+
719,1170, 959, 440, 437, 534, 84, 388, 480,1131, 159, 220, 198, 679,2044,1012,
|
|
104
|
+
819,1066,1443, 113,1225, 194, 318,1003,1029,2045,2046,2047,2048,1067,2049,2050,
|
|
105
|
+
2051,2052,2053, 59, 913, 112,2054, 632,2055, 455, 144, 739,1291,2056, 273, 681,
|
|
106
|
+
499,2057, 448,2058,2059, 760,2060,2061, 970, 384, 169, 245,1132,2062,2063, 414,
|
|
107
|
+
1444,2064,2065, 41, 235,2066, 157, 252, 877, 568, 919, 789, 580,2067, 725,2068,
|
|
108
|
+
2069,1292,2070,2071,1445,2072,1446,2073,2074, 55, 588, 66,1447, 271,1092,2075,
|
|
109
|
+
1226,2076, 960,1013, 372,2077,2078,2079,2080,2081,1293,2082,2083,2084,2085, 850,
|
|
110
|
+
2086,2087,2088,2089,2090, 186,2091,1068, 180,2092,2093,2094, 109,1227, 522, 606,
|
|
111
|
+
2095, 867,1448,1093, 991,1171, 926, 353,1133,2096, 581,2097,2098,2099,1294,1449,
|
|
112
|
+
1450,2100, 596,1172,1014,1228,2101,1451,1295,1173,1229,2102,2103,1296,1134,1452,
|
|
113
|
+
949,1135,2104,2105,1094,1453,1454,1455,2106,1095,2107,2108,2109,2110,2111,2112,
|
|
114
|
+
2113,2114,2115,2116,2117, 804,2118,2119,1230,1231, 805,1456, 405,1136,2120,2121,
|
|
115
|
+
2122,2123,2124, 720, 701,1297, 992,1457, 927,1004,2125,2126,2127,2128,2129,2130,
|
|
116
|
+
22, 417,2131, 303,2132, 385,2133, 971, 520, 513,2134,1174, 73,1096, 231, 274,
|
|
117
|
+
962,1458, 673,2135,1459,2136, 152,1137,2137,2138,2139,2140,1005,1138,1460,1139,
|
|
118
|
+
2141,2142,2143,2144, 11, 374, 844,2145, 154,1232, 46,1461,2146, 838, 830, 721,
|
|
119
|
+
1233, 106,2147, 90, 428, 462, 578, 566,1175, 352,2148,2149, 538,1234, 124,1298,
|
|
120
|
+
2150,1462, 761, 565,2151, 686,2152, 649,2153, 72, 173,2154, 460, 415,2155,1463,
|
|
121
|
+
2156,1235, 305,2157,2158,2159,2160,2161,2162, 579,2163,2164,2165,2166,2167, 747,
|
|
122
|
+
2168,2169,2170,2171,1464, 669,2172,2173,2174,2175,2176,1465,2177, 23, 530, 285,
|
|
123
|
+
2178, 335, 729,2179, 397,2180,2181,2182,1030,2183,2184, 698,2185,2186, 325,2187,
|
|
124
|
+
2188, 369,2189, 799,1097,1015, 348,2190,1069, 680,2191, 851,1466,2192,2193, 10,
|
|
125
|
+
2194, 613, 424,2195, 979, 108, 449, 589, 27, 172, 81,1031, 80, 774, 281, 350,
|
|
126
|
+
1032, 525, 301, 582,1176,2196, 674,1045,2197,2198,1467, 730, 762,2199,2200,2201,
|
|
127
|
+
2202,1468,2203, 993,2204,2205, 266,1070, 963,1140,2206,2207,2208, 664,1098, 972,
|
|
128
|
+
2209,2210,2211,1177,1469,1470, 871,2212,2213,2214,2215,2216,1471,2217,2218,2219,
|
|
129
|
+
2220,2221,2222,2223,2224,2225,2226,2227,1472,1236,2228,2229,2230,2231,2232,2233,
|
|
130
|
+
2234,2235,1299,2236,2237, 200,2238, 477, 373,2239,2240, 731, 825, 777,2241,2242,
|
|
131
|
+
2243, 521, 486, 548,2244,2245,2246,1473,1300, 53, 549, 137, 875, 76, 158,2247,
|
|
132
|
+
1301,1474, 469, 396,1016, 278, 712,2248, 321, 442, 503, 767, 744, 941,1237,1178,
|
|
133
|
+
1475,2249, 82, 178,1141,1179, 973,2250,1302,2251, 297,2252,2253, 570,2254,2255,
|
|
134
|
+
2256, 18, 450, 206,2257, 290, 292,1142,2258, 511, 162, 99, 346, 164, 735,2259,
|
|
135
|
+
1476,1477, 4, 554, 343, 798,1099,2260,1100,2261, 43, 171,1303, 139, 215,2262,
|
|
136
|
+
2263, 717, 775,2264,1033, 322, 216,2265, 831,2266, 149,2267,1304,2268,2269, 702,
|
|
137
|
+
1238, 135, 845, 347, 309,2270, 484,2271, 878, 655, 238,1006,1478,2272, 67,2273,
|
|
138
|
+
295,2274,2275, 461,2276, 478, 942, 412,2277,1034,2278,2279,2280, 265,2281, 541,
|
|
139
|
+
2282,2283,2284,2285,2286, 70, 852,1071,2287,2288,2289,2290, 21, 56, 509, 117,
|
|
140
|
+
432,2291,2292, 331, 980, 552,1101, 148, 284, 105, 393,1180,1239, 755,2293, 187,
|
|
141
|
+
2294,1046,1479,2295, 340,2296, 63,1047, 230,2297,2298,1305, 763,1306, 101, 800,
|
|
142
|
+
808, 494,2299,2300,2301, 903,2302, 37,1072, 14, 5,2303, 79, 675,2304, 312,
|
|
143
|
+
2305,2306,2307,2308,2309,1480, 6,1307,2310,2311,2312, 1, 470, 35, 24, 229,
|
|
144
|
+
2313, 695, 210, 86, 778, 15, 784, 592, 779, 32, 77, 855, 964,2314, 259,2315,
|
|
145
|
+
501, 380,2316,2317, 83, 981, 153, 689,1308,1481,1482,1483,2318,2319, 716,1484,
|
|
146
|
+
2320,2321,2322,2323,2324,2325,1485,2326,2327, 128, 57, 68, 261,1048, 211, 170,
|
|
147
|
+
1240, 31,2328, 51, 435, 742,2329,2330,2331, 635,2332, 264, 456,2333,2334,2335,
|
|
148
|
+
425,2336,1486, 143, 507, 263, 943,2337, 363, 920,1487, 256,1488,1102, 243, 601,
|
|
149
|
+
1489,2338,2339,2340,2341,2342,2343,2344, 861,2345,2346,2347,2348,2349,2350, 395,
|
|
150
|
+
2351,1490,1491, 62, 535, 166, 225,2352,2353, 668, 419,1241, 138, 604, 928,2354,
|
|
151
|
+
1181,2355,1492,1493,2356,2357,2358,1143,2359, 696,2360, 387, 307,1309, 682, 476,
|
|
152
|
+
2361,2362, 332, 12, 222, 156,2363, 232,2364, 641, 276, 656, 517,1494,1495,1035,
|
|
153
|
+
416, 736,1496,2365,1017, 586,2366,2367,2368,1497,2369, 242,2370,2371,2372,1498,
|
|
154
|
+
2373, 965, 713,2374,2375,2376,2377, 740, 982,1499, 944,1500,1007,2378,2379,1310,
|
|
155
|
+
1501,2380,2381,2382, 785, 329,2383,2384,1502,2385,2386,2387, 932,2388,1503,2389,
|
|
156
|
+
2390,2391,2392,1242,2393,2394,2395,2396,2397, 994, 950,2398,2399,2400,2401,1504,
|
|
157
|
+
1311,2402,2403,2404,2405,1049, 749,2406,2407, 853, 718,1144,1312,2408,1182,1505,
|
|
158
|
+
2409,2410, 255, 516, 479, 564, 550, 214,1506,1507,1313, 413, 239, 444, 339,1145,
|
|
159
|
+
1036,1508,1509,1314,1037,1510,1315,2411,1511,2412,2413,2414, 176, 703, 497, 624,
|
|
160
|
+
593, 921, 302,2415, 341, 165,1103,1512,2416,1513,2417,2418,2419, 376,2420, 700,
|
|
161
|
+
2421,2422,2423, 258, 768,1316,2424,1183,2425, 995, 608,2426,2427,2428,2429, 221,
|
|
162
|
+
2430,2431,2432,2433,2434,2435,2436,2437, 195, 323, 726, 188, 897, 983,1317, 377,
|
|
163
|
+
644,1050, 879,2438, 452,2439,2440,2441,2442,2443,2444, 914,2445,2446,2447,2448,
|
|
164
|
+
915, 489,2449,1514,1184,2450,2451, 515, 64, 427, 495,2452, 583,2453, 483, 485,
|
|
165
|
+
1038, 562, 213,1515, 748, 666,2454,2455,2456,2457, 334,2458, 780, 996,1008, 705,
|
|
166
|
+
1243,2459,2460,2461,2462,2463, 114,2464, 493,1146, 366, 163,1516, 961,1104,2465,
|
|
167
|
+
291,2466,1318,1105,2467,1517, 365,2468, 355, 951,1244,2469,1319,2470, 631,2471,
|
|
168
|
+
2472, 218,1320, 364, 320, 756,1518,1519,1321,1520,1322,2473,2474,2475,2476, 997,
|
|
169
|
+
2477,2478,2479,2480, 665,1185,2481, 916,1521,2482,2483,2484, 584, 684,2485,2486,
|
|
170
|
+
797,2487,1051,1186,2488,2489,2490,1522,2491,2492, 370,2493,1039,1187, 65,2494,
|
|
171
|
+
434, 205, 463,1188,2495, 125, 812, 391, 402, 826, 699, 286, 398, 155, 781, 771,
|
|
172
|
+
585,2496, 590, 505,1073,2497, 599, 244, 219, 917,1018, 952, 646,1523,2498,1323,
|
|
173
|
+
2499,2500, 49, 984, 354, 741,2501, 625,2502,1324,2503,1019, 190, 357, 757, 491,
|
|
174
|
+
95, 782, 868,2504,2505,2506,2507,2508,2509, 134,1524,1074, 422,1525, 898,2510,
|
|
175
|
+
161,2511,2512,2513,2514, 769,2515,1526,2516,2517, 411,1325,2518, 472,1527,2519,
|
|
176
|
+
2520,2521,2522,2523,2524, 985,2525,2526,2527,2528,2529,2530, 764,2531,1245,2532,
|
|
177
|
+
2533, 25, 204, 311,2534, 496,2535,1052,2536,2537,2538,2539,2540,2541,2542, 199,
|
|
178
|
+
704, 504, 468, 758, 657,1528, 196, 44, 839,1246, 272, 750,2543, 765, 862,2544,
|
|
179
|
+
2545,1326,2546, 132, 615, 933,2547, 732,2548,2549,2550,1189,1529,2551, 283,1247,
|
|
180
|
+
1053, 607, 929,2552,2553,2554, 930, 183, 872, 616,1040,1147,2555,1148,1020, 441,
|
|
181
|
+
249,1075,2556,2557,2558, 466, 743,2559,2560,2561, 92, 514, 426, 420, 526,2562,
|
|
182
|
+
2563,2564,2565,2566,2567,2568, 185,2569,2570,2571,2572, 776,1530, 658,2573, 362,
|
|
183
|
+
2574, 361, 922,1076, 793,2575,2576,2577,2578,2579,2580,1531, 251,2581,2582,2583,
|
|
184
|
+
2584,1532, 54, 612, 237,1327,2585,2586, 275, 408, 647, 111,2587,1533,1106, 465,
|
|
185
|
+
3, 458, 9, 38,2588, 107, 110, 890, 209, 26, 737, 498,2589,1534,2590, 431,
|
|
186
|
+
202, 88,1535, 356, 287,1107, 660,1149,2591, 381,1536, 986,1150, 445,1248,1151,
|
|
187
|
+
974,2592,2593, 846,2594, 446, 953, 184,1249,1250, 727,2595, 923, 193, 883,2596,
|
|
188
|
+
2597,2598, 102, 324, 539, 817,2599, 421,1041,2600, 832,2601, 94, 175, 197, 406,
|
|
189
|
+
2602, 459,2603,2604,2605,2606,2607, 330, 555,2608,2609,2610, 706,1108, 389,2611,
|
|
190
|
+
2612,2613,2614, 233,2615, 833, 558, 931, 954,1251,2616,2617,1537, 546,2618,2619,
|
|
191
|
+
1009,2620,2621,2622,1538, 690,1328,2623, 955,2624,1539,2625,2626, 772,2627,2628,
|
|
192
|
+
2629,2630,2631, 924, 648, 863, 603,2632,2633, 934,1540, 864, 865,2634, 642,1042,
|
|
193
|
+
670,1190,2635,2636,2637,2638, 168,2639, 652, 873, 542,1054,1541,2640,2641,2642, # 512, 256
|
|
194
|
+
)
|
|
195
|
+
|
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
######################## BEGIN LICENSE BLOCK ########################
|
|
2
|
-
# The Original Code is mozilla.org code.
|
|
3
|
-
#
|
|
4
|
-
# The Initial Developer of the Original Code is
|
|
5
|
-
# Netscape Communications Corporation.
|
|
6
|
-
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
7
|
-
# the Initial Developer. All Rights Reserved.
|
|
8
|
-
#
|
|
9
|
-
# Contributor(s):
|
|
10
|
-
# Mark Pilgrim - port to Python
|
|
11
|
-
#
|
|
12
|
-
# This library is free software; you can redistribute it and/or
|
|
13
|
-
# modify it under the terms of the GNU Lesser General Public
|
|
14
|
-
# License as published by the Free Software Foundation; either
|
|
15
|
-
# version 2.1 of the License, or (at your option) any later version.
|
|
16
|
-
#
|
|
17
|
-
# This library is distributed in the hope that it will be useful,
|
|
18
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
20
|
-
# Lesser General Public License for more details.
|
|
21
|
-
#
|
|
22
|
-
# You should have received a copy of the GNU Lesser General Public
|
|
23
|
-
# License along with this library; if not, write to the Free Software
|
|
24
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
25
|
-
# 02110-1301 USA
|
|
26
|
-
######################### END LICENSE BLOCK #########################
|
|
27
|
-
|
|
28
|
-
from .mbcharsetprober import MultiByteCharSetProber
|
|
29
|
-
from .codingstatemachine import CodingStateMachine
|
|
30
|
-
from .chardistribution import EUCKRDistributionAnalysis
|
|
31
|
-
from .mbcssm import
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class EUCKRProber(MultiByteCharSetProber):
|
|
35
|
-
def __init__(self):
|
|
36
|
-
|
|
37
|
-
self.
|
|
38
|
-
self.
|
|
39
|
-
self.reset()
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
######################## BEGIN LICENSE BLOCK ########################
|
|
2
|
+
# The Original Code is mozilla.org code.
|
|
3
|
+
#
|
|
4
|
+
# The Initial Developer of the Original Code is
|
|
5
|
+
# Netscape Communications Corporation.
|
|
6
|
+
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
7
|
+
# the Initial Developer. All Rights Reserved.
|
|
8
|
+
#
|
|
9
|
+
# Contributor(s):
|
|
10
|
+
# Mark Pilgrim - port to Python
|
|
11
|
+
#
|
|
12
|
+
# This library is free software; you can redistribute it and/or
|
|
13
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
14
|
+
# License as published by the Free Software Foundation; either
|
|
15
|
+
# version 2.1 of the License, or (at your option) any later version.
|
|
16
|
+
#
|
|
17
|
+
# This library is distributed in the hope that it will be useful,
|
|
18
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
20
|
+
# Lesser General Public License for more details.
|
|
21
|
+
#
|
|
22
|
+
# You should have received a copy of the GNU Lesser General Public
|
|
23
|
+
# License along with this library; if not, write to the Free Software
|
|
24
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
25
|
+
# 02110-1301 USA
|
|
26
|
+
######################### END LICENSE BLOCK #########################
|
|
27
|
+
|
|
28
|
+
from .mbcharsetprober import MultiByteCharSetProber
|
|
29
|
+
from .codingstatemachine import CodingStateMachine
|
|
30
|
+
from .chardistribution import EUCKRDistributionAnalysis
|
|
31
|
+
from .mbcssm import EUCKR_SM_MODEL
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class EUCKRProber(MultiByteCharSetProber):
|
|
35
|
+
def __init__(self):
|
|
36
|
+
super(EUCKRProber, self).__init__()
|
|
37
|
+
self.coding_sm = CodingStateMachine(EUCKR_SM_MODEL)
|
|
38
|
+
self.distribution_analyzer = EUCKRDistributionAnalysis()
|
|
39
|
+
self.reset()
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def charset_name(self):
|
|
43
|
+
return "EUC-KR"
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def language(self):
|
|
47
|
+
return "Korean"
|