Hackfut Security File Manager
Current Path:
/opt/alt/python27/lib/python2.7/site-packages/chardet
opt
/
alt
/
python27
/
lib
/
python2.7
/
site-packages
/
chardet
/
📁
..
📄
__init__.py
(1.26 KB)
📄
__init__.pyc
(823 B)
📄
__init__.pyo
(823 B)
📄
big5freq.py
(80.66 KB)
📄
big5freq.pyc
(111.13 KB)
📄
big5freq.pyo
(111.13 KB)
📄
big5prober.py
(1.64 KB)
📄
big5prober.pyc
(1.12 KB)
📄
big5prober.pyo
(1.12 KB)
📄
chardetect.py
(2.42 KB)
📄
chardetect.pyc
(2.94 KB)
📄
chardetect.pyo
(2.94 KB)
📄
chardistribution.py
(9.01 KB)
📄
chardistribution.pyc
(7.68 KB)
📄
chardistribution.pyo
(7.68 KB)
📄
charsetgroupprober.py
(3.7 KB)
📄
charsetgroupprober.pyc
(2.57 KB)
📄
charsetgroupprober.pyo
(2.57 KB)
📄
charsetprober.py
(1.86 KB)
📄
charsetprober.pyc
(2.22 KB)
📄
charsetprober.pyo
(2.22 KB)
📄
codingstatemachine.py
(2.26 KB)
📄
codingstatemachine.pyc
(1.83 KB)
📄
codingstatemachine.pyo
(1.83 KB)
📄
compat.py
(1.13 KB)
📄
compat.pyc
(585 B)
📄
compat.pyo
(585 B)
📄
constants.py
(1.3 KB)
📄
constants.pyc
(345 B)
📄
constants.pyo
(345 B)
📄
cp949prober.py
(1.74 KB)
📄
cp949prober.pyc
(1.13 KB)
📄
cp949prober.pyo
(1.13 KB)
📄
escprober.py
(3.11 KB)
📄
escprober.pyc
(2.4 KB)
📄
escprober.pyo
(2.4 KB)
📄
escsm.py
(7.66 KB)
📄
escsm.pyc
(7.15 KB)
📄
escsm.pyo
(7.15 KB)
📄
eucjpprober.py
(3.59 KB)
📄
eucjpprober.pyc
(2.8 KB)
📄
eucjpprober.pyo
(2.8 KB)
📄
euckrfreq.py
(44.9 KB)
📄
euckrfreq.pyc
(86.7 KB)
📄
euckrfreq.pyo
(86.7 KB)
📄
euckrprober.py
(1.64 KB)
📄
euckrprober.pyc
(1.13 KB)
📄
euckrprober.pyo
(1.13 KB)
📄
euctwfreq.py
(34.05 KB)
📄
euctwfreq.pyc
(59.75 KB)
📄
euctwfreq.pyo
(59.75 KB)
📄
euctwprober.py
(1.64 KB)
📄
euctwprober.pyc
(1.13 KB)
📄
euctwprober.pyo
(1.13 KB)
📄
gb2312freq.py
(35.17 KB)
📄
gb2312freq.pyc
(67.19 KB)
📄
gb2312freq.pyo
(67.19 KB)
📄
gb2312prober.py
(1.64 KB)
📄
gb2312prober.pyc
(1.13 KB)
📄
gb2312prober.pyo
(1.13 KB)
📄
hebrewprober.py
(13.05 KB)
📄
hebrewprober.pyc
(3.45 KB)
📄
hebrewprober.pyo
(3.45 KB)
📄
jisfreq.py
(46.21 KB)
📄
jisfreq.pyc
(82.05 KB)
📄
jisfreq.pyo
(82.05 KB)
📄
jpcntx.py
(18.89 KB)
📄
jpcntx.pyc
(24.65 KB)
📄
jpcntx.pyo
(24.65 KB)
📄
langbulgarianmodel.py
(12.48 KB)
📄
langbulgarianmodel.pyc
(24.31 KB)
📄
langbulgarianmodel.pyo
(24.31 KB)
📄
langcyrillicmodel.py
(17.31 KB)
📄
langcyrillicmodel.pyc
(29.86 KB)
📄
langcyrillicmodel.pyo
(29.86 KB)
📄
langgreekmodel.py
(12.33 KB)
📄
langgreekmodel.pyc
(24.01 KB)
📄
langgreekmodel.pyo
(24.01 KB)
📄
langhebrewmodel.py
(11.05 KB)
📄
langhebrewmodel.pyc
(22.86 KB)
📄
langhebrewmodel.pyo
(22.86 KB)
📄
langhungarianmodel.py
(12.24 KB)
📄
langhungarianmodel.pyc
(24.3 KB)
📄
langhungarianmodel.pyo
(24.3 KB)
📄
langthaimodel.py
(11.01 KB)
📄
langthaimodel.pyc
(22.84 KB)
📄
langthaimodel.pyo
(22.84 KB)
📄
latin1prober.py
(5.11 KB)
📄
latin1prober.pyc
(3.46 KB)
📄
latin1prober.pyo
(3.46 KB)
📄
mbcharsetprober.py
(3.19 KB)
📄
mbcharsetprober.pyc
(2.44 KB)
📄
mbcharsetprober.pyo
(2.44 KB)
📄
mbcsgroupprober.py
(1.92 KB)
📄
mbcsgroupprober.pyc
(1.25 KB)
📄
mbcsgroupprober.pyo
(1.25 KB)
📄
mbcssm.py
(19.13 KB)
📄
mbcssm.pyc
(17.26 KB)
📄
mbcssm.pyo
(17.26 KB)
📄
sbcharsetprober.py
(4.68 KB)
📄
sbcharsetprober.pyc
(3.31 KB)
📄
sbcharsetprober.pyo
(3.31 KB)
📄
sbcsgroupprober.py
(3.21 KB)
📄
sbcsgroupprober.pyc
(1.92 KB)
📄
sbcsgroupprober.pyo
(1.92 KB)
📄
sjisprober.py
(3.68 KB)
📄
sjisprober.pyc
(2.83 KB)
📄
sjisprober.pyo
(2.83 KB)
📄
universaldetector.py
(6.68 KB)
📄
universaldetector.pyc
(4.11 KB)
📄
universaldetector.pyo
(4.11 KB)
📄
utf8prober.py
(2.59 KB)
📄
utf8prober.pyc
(2.23 KB)
📄
utf8prober.pyo
(2.23 KB)
Editing: chardetect.py
""" Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from __future__ import absolute_import, print_function, unicode_literals import argparse import sys from io import open from chardet import __version__ from chardet.universaldetector import UniversalDetector def description_of(lines, name='stdin'): """ Return a string describing the probable encoding of a file or list of strings. :param lines: The lines to get the encoding of. :type lines: Iterable of bytes :param name: Name of file or collection of lines :type name: str """ u = UniversalDetector() for line in lines: u.feed(line) u.close() result = u.result if result['encoding']: return '{0}: {1} with confidence {2}'.format(name, result['encoding'], result['confidence']) else: return '{0}: no result'.format(name) def main(argv=None): ''' Handles command line arguments and gets things started. :param argv: List of arguments, as if specified on the command-line. If None, ``sys.argv[1:]`` is used instead. :type argv: list of str ''' # Get command line arguments parser = argparse.ArgumentParser( description="Takes one or more file paths and reports their detected \ encodings", formatter_class=argparse.ArgumentDefaultsHelpFormatter, conflict_handler='resolve') parser.add_argument('input', help='File whose encoding we would like to determine.', type=argparse.FileType('rb'), nargs='*', default=[sys.stdin]) parser.add_argument('--version', action='version', version='%(prog)s {0}'.format(__version__)) args = parser.parse_args(argv) for f in args.input: if f.isatty(): print("You are running chardetect interactively. Press " + "CTRL-D twice at the start of a blank line to signal the " + "end of your input. If you want help, run chardetect " + "--help\n", file=sys.stderr) print(description_of(f, f.name)) if __name__ == '__main__': main()
Upload File
Create Folder