File manager - Edit - /opt/alt/python34/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/__pycache__/chardetect.cpython-34.pyc
Back
� �Reu � @ sq d Z d d l m Z d d l m Z m Z d d l m Z d d d � Z d d � Z e d k rm e � n d S)a 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. � )�open)�argv�stdin)�UniversalDetectorr c C si t � } x | D] } | j | � q W| j � | j } | d r] d | | d | d f Sd | Sd S)z;Return a string describing the probable encoding of a file.�encodingz%s: %s with confidence %s� confidencez %s: no resultN)r �feed�close�result)�file�name�u�liner � r �K/tmp/pip-ztkk0jow-build/pip/_vendor/requests/packages/chardet/chardetect.py�description_of s r c C so t t � d k r% t t t � � nF xC t d d � D]1 } t | d � � } t t | | � � Wd QXq6 Wd S)N� �rb)�lenr �printr r r )�path�fr r r �main$ s r �__main__N)�__doc__�ior �sysr r �chardet.universaldetectorr r r �__name__r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings