Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
codecs.cpython-314.pyc461 linesDownload Raw Back to __pycache__
1+
2��i���,�Rt^RIt^RIt^RI5.RNRNRNRNRNR	NR3NRNRNR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NtR0tR1;t	t4R2;ttR3t
R4t]PR58Xd]5;tt]
tM];tt]t]6t]t]
t]t!R6R]4t!R7R4t!R8R]4t!R9R:]4t!R;R]4t!R<R=]4t!R>R]4t!R?R]4t !R@R4t!!RAR4t"RTRClt#RURDlt$REt%RFt&RGt'RHt(RIt)RJt*RVRKlt+RVRLlt,RMt-RNt.]/!RB4t0]/!RO4t1]/!RP4t2]/!RQ4t3]/!RR4t4]/!RS4t5^t6]6'd^RI7t7R#R# ]dt]!R],4hRtAii;i)Wz�codecs -- Python Codec Registry, API and helpers.7 8 9Written by Marc-Andre Lemburg (mal@lemburg.com).10 11(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.12 13N)�*z%Failed to load the builtin codecs: %s�register�lookup�open�EncodedFile�BOM�BOM_BE�BOM_LE�BOM32_BE�BOM32_LE�BOM64_BE�BOM64_LE�BOM_UTF8�	BOM_UTF16�BOM_UTF16_LE�BOM_UTF16_BE�	BOM_UTF32�BOM_UTF32_LE�BOM_UTF32_BE�	CodecInfo�Codec�IncrementalEncoder�IncrementalDecoder�StreamReader�StreamWriter�StreamReaderWriter�
StreamRecoder�14getencoder�15getdecoder�getincrementalencoder�getincrementaldecoder�	getreader�	getwriter�encode�decode�16iterencode�17iterdecode�
strict_errors�
ignore_errors�replace_errors�xmlcharrefreplace_errors�backslashreplace_errors�namereplace_errors�register_error�lookup_errorss��s��s��s���littlec�Fa�]tRt^StoRtRtR	RR/RlltRtRtRt	Vt18R#)19rz0Codec details when looking up the codec registryTN�_is_text_encodingc��\PWW#V34p	WynWnW)nWYnWinWInW9nVeW�n	V	#�N)20�tuple�__new__�namer#r$�incrementalencoder�incrementaldecoder�streamwriter�streamreaderr1)21�clsr#r$r:r9r7r8r6r1�selfs22&&&&&&&&$ �
Lib\codecs.pyr5�CodecInfo.__new__^sQ���}�}�S�6��"N�O���	�����"4��"4��(��(���(�%6�"���c��RVPPVPPVP\	V43,#)z%<%s.%s object for encoding %s at %#x>)�	__class__�23__module__�__qualname__r6�id�r<s&r=�__repr__�CodecInfo.__repr__ms:��6����*�*�D�N�N�,G�,G����B�t�H�&�&�	&r?c��\V4#r3)r4rEs&r=�__getnewargs__�CodecInfo.__getnewargs__rs���T�{�r?)r1r$r#r8r7r6r:r9)NNNNN)�__name__rBrC�__firstlineno__�__doc__r1r5rFrI�__static_attributes__�__classdictcell__��
__classdict__s@r=rrSs,����:���
�!�
�&�24�r?c�8a�]tRt^utoRtRRltRRltRtVtR#)ra�Defines the interface for stateless encoders/decoders.25 26The .encode()/.decode() methods may use different error27handling schemes by providing the errors argument. These28string values are predefined:29 30 'strict' - raise a ValueError error (or a subclass)31 'ignore' - ignore the character and continue with the next32 'replace' - replace with a suitable replacement character;33            Python will use the official U+FFFD REPLACEMENT34            CHARACTER for the builtin Unicode codecs on35            decoding and '?' on encoding.36 'surrogateescape' - replace with private code points U+DCnn.37 'xmlcharrefreplace' - Replace with the appropriate XML38                       character reference (only for encoding).39 'backslashreplace'  - Replace with backslashed escape sequences.40 'namereplace'       - Replace with \N{...} escape sequences41                       (only for encoding).42 43The set of allowed values can be extended via register_error.44 45c��\h)a�Encodes the object input and returns a tuple (output46object, length consumed).47 48errors defines the error handling to apply. It defaults to49'strict' handling.50 51The method may not store state in the Codec instance. Use52StreamWriter for codecs which have to keep state in order to53make encoding efficient.54 55The encoder must be able to handle zero length input and56return an empty object of the output object type in this57situation.58 59��NotImplementedError�r<�input�errorss&&&r=r#�Codec.encode�s60��""�!r?c��\h)aYDecodes the object input and returns a tuple (output61object, length consumed).62 63input must be an object which provides the bf_getreadbuf64buffer slot. Python strings, buffer objects and memory65mapped files are examples of objects providing this slot.66 67errors defines the error handling to apply. It defaults to68'strict' handling.69 70The method may not store state in the Codec instance. Use71StreamReader for codecs which have to keep state in order to72make decoding efficient.73 74The decoder must be able to handle zero length input and75return an empty object of the output object type in this76situation.77 78rTrVs&&&r=r$�Codec.decode�s79��*"�!r?�N��strict)	rKrBrCrLrMr#r$rNrOrPs@r=rrus�����,"�&"�"r?c�Ja�]tRt^�toRtR	RltR80RltRtRtRt	Rt81VtR#)rz�82An IncrementalEncoder encodes an input in multiple steps. The input can83be passed piece by piece to the encode() method. The IncrementalEncoder84remembers the state of the encoding process between calls to encode().85c� �WnRVnR#)z�86Creates an IncrementalEncoder instance.87 88The IncrementalEncoder may use different error handling schemes by89providing the errors keyword argument. See the module docstring90for a list of possible values.91�N)rX�buffer�r<rXs&&r=�__init__�IncrementalEncoder.__init__�s������r?c��\h)z192Encodes input and returns the resulting object.93rT�r<rW�finals&&&r=r#�IncrementalEncoder.encode��94��"�!r?c��R#)z*95Resets the encoder to the initial state.96Nr\rEs&r=�reset�IncrementalEncoder.reset���r?c��^#)z*97Return the current state of the encoder.98r\rEs&r=�getstate�IncrementalEncoder.getstate�s��r?c��R#)zT99Set the current state of the encoder. state must have been100returned by getstate().101Nr\�r<�states&&r=�setstate�IncrementalEncoder.setstate�rnr?)rbrXNr]�F)rKrBrCrLrMrdr#rlrprurNrOrPs@r=rr�s(�����102	�"��103��r?c�Pa�]tRt^�toRtR104RltRtRRltRtRt	Rt105RtVtR	#)�BufferedIncrementalEncoderz�106This subclass of IncrementalEncoder can be used as the baseclass for an107incremental encoder if the encoder must keep some of the output in a108buffer between calls to encode().109c�>�\PW4RVnR#�raN)rrdrbrcs&&r=rd�#BufferedIncrementalEncoder.__init__�s���#�#�D�1���r?c��\hr3rT�r<rWrXrhs&&&&r=�_buffer_encode�)BufferedIncrementalEncoder._buffer_encode��110��"�!r?c�z�VPV,pVPW0PV4wrEW5RVnV#r3)rbrrX�r<rWrh�data�result�consumeds&&&   r=r#�!BufferedIncrementalEncoder.encode��9���{�{�U�"��!�0�0��{�{�E�J����9�o����
r?c�>�\PV4RVnR#r{)rrlrbrEs&r=rl� BufferedIncrementalEncoder.reset�s��� � ��&���r?c�.�VP;'g^#���rbrEs&r=rp�#BufferedIncrementalEncoder.getstate�s���{�{���a�r?c�(�T;'gRVnR#r{r�rss&&r=ru�#BufferedIncrementalEncoder.setstate�s���k�k�r��r?r�Nr]rw)
rKrBrCrLrMrdrr#rlrprurNrOrPs@r=ryry�s-�����111�112"�113�� �"�"r?ryc�Ja�]tRtRtoRtR114RltRRltRtRtRt	Rt115VtR	#)riz�116An IncrementalDecoder decodes an input in multiple steps. The input can117be passed piece by piece to the decode() method. The IncrementalDecoder118remembers the state of the decoding process between calls to decode().119c��WnR#)z�120Create an IncrementalDecoder instance.121 122The IncrementalDecoder may use different error handling schemes by123providing the errors keyword argument. See the module docstring124for a list of possible values.125N�rXrcs&&r=rd�IncrementalDecoder.__init__s	���r?c��\h)z0126Decode input and returns the resulting object.127rTrgs&&&r=r$�IncrementalDecoder.decoderjr?c��R#)z)128Reset the decoder to the initial state.129Nr\rEs&r=rl�IncrementalDecoder.resetrnr?c��R#)a�130Return the current state of the decoder.131 132This must be a (buffered_input, additional_state_info) tuple.133buffered_input must be a bytes object containing bytes that134were passed to decode() that have not yet been converted.135additional_state_info must be a non-negative integer136representing the state of the decoder WITHOUT yet having137processed the contents of buffered_input.  In the initial state138and after reset(), getstate() must return (b"", 0).139)r?r�r\rEs&r=rp�IncrementalDecoder.getstates	���r?c��R#)z�140Set the current state of the decoder.141 142state must have been returned by getstate().  The effect of143setstate((b"", 0)) must be equivalent to reset().144Nr\rss&&r=ru�IncrementalDecoder.setstate*rnr?r�Nr]rw)rKrBrCrLrMrdr$rlrprurNrOrPs@r=rrs(�����145�"��146��r?c�Pa�]tRtRtoRtRRltRtRRltRtRt	Rt147R	tVtR148#)
�BufferedIncrementalDecoderi2z�149This subclass of IncrementalDecoder can be used as the baseclass for an150incremental decoder if the decoder must be able to handle incomplete151byte sequences.152c�>�\PW4RVnR#�r?N)rrdrbrcs&&r=rd�#BufferedIncrementalDecoder.__init__8s���#�#�D�1���r?c��\hr3rTr~s&&&&r=�_buffer_decode�)BufferedIncrementalDecoder._buffer_decode=r�r?c�z�VPV,pVPW0PV4wrEW5RVnV#r3)rbr�rXr�s&&&   r=r$�!BufferedIncrementalDecoder.decodeBr�r?c�>�\PV4RVnR#r�)rrlrbrEs&r=rl� BufferedIncrementalDecoder.resetJs��� � ��&���r?c��VP^3#r�r�rEs&r=rp�#BufferedIncrementalDecoder.getstateNs�����Q��r?c�"�V^,VnR#�r�Nr�rss&&r=ru�#BufferedIncrementalDecoder.setstateRs
���A�h��r?r�Nr]rw)
rKrBrCrLrMrdr�r$rlrprurNrOrPs@r=r�r�2s-�����153�154"�155�� ��r?r�c�da�]tRtRtoR
RltRtRtRtRRlt]	3Rlt156RtR	tR157t
RtVtR#)ri]c��WnW nR#)a�Creates a StreamWriter instance.158 159stream must be a file-like object open for writing.160 161The StreamWriter may use different error handling162schemes by providing the errors keyword argument. These163parameters are predefined:164 165 'strict' - raise a ValueError (or a subclass)166 'ignore' - ignore the character and continue with the next167 'replace'- replace with a suitable replacement character168 'xmlcharrefreplace' - Replace with the appropriate XML169                       character reference.170 'backslashreplace'  - Replace with backslashed escape171                       sequences.172 'namereplace'       - Replace with \N{...} escape sequences.173 174The set of allowed parameter values can be extended via175register_error.176N)�streamrX�r<r�rXs&&&r=rd�StreamWriter.__init___s��,���r?c�v�VPWP4wr#VPPV4R#)z=Writes the object's contents encoded to self.stream.177        N)r#rXr��write)r<�objectr�r�s&&  r=r��StreamWriter.writexs*�����V�[�[�9��������$�r?c�F�VPRPV44R#)zFWrites the concatenated list of strings to the stream178using .write().179raN)r��join�r<�lists&&r=�180writelines�StreamWriter.writeliness��181	
�182�183�2�7�7�4�=�!r?c��R#)z�Resets the codec buffers used for keeping internal state.184 185Calling this method should ensure that the data on the186output is put into a clean state, that allows appending187of new fresh data without having to rescan the whole188stream to recover state.189 190Nr\rEs&r=rl�StreamWriter.reset�s��	
r?c��VPPW4V^8XdV^8XdVP4R#R#R#r��r��seekrl�r<�offset�whences&&&r=r��StreamWriter.seek�s1��������(��Q�;�6�Q�;��J�J�L�'�;r?c�(�V!VPV4#�z>Inherit all other methods from the underlying stream.191        �r��r<r6�getattrs&&&r=�__getattr__�StreamWriter.__getattr__����192�t�{�{�D�)�)r?c��V#r3r\rEs&r=�	__enter__�StreamWriter.__enter__�����r?c�:�VPP4R#r3�r��close�r<�type�value�tbs&&&&r=�__exit__�StreamWriter.__exit__���������r?c�N�\RVPP,4h�zcan't serialize %s��	TypeErrorrArK�r<�protos&&r=�
__reduce_ex__�StreamWriter.__reduce_ex__�����,�t�~�~�/F�/F�F�G�Gr?)rXr�Nr]r�)rKrBrCrLrdr�r�rlr�r�r�r�r�r�rNrOrPs@r=rr]s>�����2 �"�193
��$�*���H�Hr?c�a�]tRtRto]tRRltRRltRRltRRlt	RRlt194RtRR	ltR195t
Rt]3RltR
tRtRtRtVtR#)ri�c��WnW nRVnVP4VnVPVnRVnR#)aCreates a StreamReader instance.196 197stream must be a file-like object open for reading.198 199The StreamReader may use different error handling200schemes by providing the errors keyword argument. These201parameters are predefined:202 203 'strict' - raise a ValueError (or a subclass)204 'ignore' - ignore the character and continue with the next205 'replace'- replace with a suitable replacement character206 'backslashreplace' - Replace with backslashed escape sequences;207 208The set of allowed parameter values can be extended via209register_error.210r?N)r�rX�211bytebuffer�charbuffertype�_empty_charbuffer�212charbuffer�213linebufferr�s&&&r=rd�StreamReader.__init__�s:��$�������!%�!4�!4�!6����0�0�����r?c��\hr3rTrVs&&&r=r$�StreamReader.decode�s��!�!r?c��VP'd2VPPVP4VnRVnV^8dTpV^8�d\	VP4V8�dM�V^8dVP214P
4pMVP215P
V4pVPV,pV'gMKVPWPP4wrgYWRTnT;PT,
unT'dK�V^8d VPp216VPVnV217#VPRVp218VPVRVnV219# \dbpT'dTTPTRTPTP4wrgTPRR7p	\	T	4^8:dhRp?L�hRp?ii;i)a�Decodes data from the stream self.stream and returns the220resulting object.221 222chars indicates the number of decoded code points or bytes to223return. read() will never return more data than requested,224but it might return less, if there is not enough available.225 226size indicates the approximate maximum number of decoded227bytes or code points to read for decoding. The decoder228can modify this setting as appropriate. The default value229-1 indicates to read and decode as much as possible.  size230is intended to prevent having to decode huge files in one231step.232 233If firstline is true, and a UnicodeDecodeError happens234after the first line terminator in the input only the first line235will be returned, the rest of the input will be kept until the236next call to read().237 238The method should use a greedy read strategy, meaning that239it should read as much data as is allowed within the240definition of the encoding and the given size, e.g.  if241optional encoding endings or state markers are available242on the stream, these should be read too.243NT��keepends)
r�r�r�r��lenr��readr�r$rX�UnicodeDecodeError�start�244splitlines)r<�size�chars�	firstline�newdatar��newchars�decodedbytes�exc�linesr�s&&&&       r=r��StreamReader.read�s���8�?�?�?�"�4�4�9�9�$�/�/�J�D�O�"�D�O��1�9��E����z��t���'�5�0���a�x��+�+�*�*�,���+�+�*�*�4�0���?�?�W�,�D���245
�)-���T�;�;�)G�&��#�=�1�D�O��O�O�x�'�O��7���1�9��_�_�F�"�4�4�D�O�246�
��_�_�V�e�,�F�"�o�o�e�f�5�D�O��
��1&�
�����D��#�)�)�$4�d�k�k�B�+�H�$�/�/��/�>�E��5�z�1�}��%���
�s�247E�G�*AG�G�GNc�x�VP'd}VP^,pVP^\VP4^8Xd VP^,VnRVnV'gVPRR7^,pV#T;'g^HpVPpVPVRR7pV'dt\
V\4'dVPR4'g.\
V\4'd1VPR4'dWPP^^R7,
pW5,
pVPRR7pV'Ed\V4^8�d�V^,pV^\V4^8�d.VR;;,VP,
uu&W`nRVnMV^,VP,VnV'gVPRR7^,pV#V^,pV^,PRR7^,pWx8wdKVPPVR	,4VP,VnV'dTpV#TpV#V'dVe-V'd"V'gVPRR7^,pV#VR2488gEK	V^,pEK)z�Read one line from the input stream and return the249decoded data.250 251size, if given, is passed as size argument to the252read() method.253 254NFr�T)r��
�
)r�r�:�NNi@�����)r�r�r�r�r�r��255isinstance�str�endswith�bytesr�)	r<r�r��line�readsizer�r��line0withend�line0withoutends	&&&      r=�readline�StreamReader.readlines=���?�?�?��?�?�1�%�D�����"��4�?�?�#�q�(�#'�/�/�!�"4���"&���������6�q�9���K��:�:�2���%�%����9�9�X��9�6�D���t�S�)�)�d�m�m�D�.A�.A��t�U�+�+��
�
�e�0D�0D��I�I�1�A�I�6�6�D��L�D��O�O�T�O�2�E��u��u�:��>�!��8�D��a���5�z�A�~��b�	�T�_�_�4�	�*/��*.���+0��(�T�_�_�*D���#�#�����>�q�A���&��% %�Q�x��"'��(�"5�"5�u�"5�"E�a�"H���2�&*�&<�&<�&A�&A�%��)�&L�&*�o�o�'6�D�O��+����� /�����
�4�+����?�?�E�?�:�1�=�D�����$���A�
�r?c�D�VP4pVPV4#)aRead all lines available on the input stream256and return them as a list.257 258Line breaks are implemented using the codec's decoder259method and are included in the list entries.260 261sizehint, if given, is ignored since there is no efficient262way of finding the true end-of-line.263 264)r�r�)r<�sizehintr�r�s&&& r=�	readlines�StreamReader.readlinesds���y�y�{�����x�(�(r?c�D�RVnVPVnRVnR#)z�Resets the codec buffers used for keeping internal state.265 266Note that no stream repositioning should take place.267This method is primarily intended to be able to recover268from decoding errors.269 270r?N)r�r�r�r�rEs&r=rl�StreamReader.resetss������0�0�����r?c�\�VPPW4VP4R#)z[Set the input stream's current position.271 272Resets the codec buffers used for keeping state.273Nr�r�s&&&r=r��StreamReader.seek�s��274	
������(��275�276�r?c�B�VP4pV'dV#\h�z3Return the next decoded line from the input stream.)r�
StopIteration)r<r277s& r=�__next__�StreamReader.__next__�s���}�}�����K��r?c��V#r3r\rEs&r=�__iter__�StreamReader.__iter__�r�r?c�(�V!VPV4#r�r�r�s&&&r=r��StreamReader.__getattr__�r�r?c��V#r3r\rEs&r=r��StreamReader.__enter__�r�r?c�:�VPP4R#r3r�r�s&&&&r=r��StreamReader.__exit__�r�r?c�N�\RVPP,4hr�r�r�s&&r=r��StreamReader.__reduce_ex__�r�r?)r�r�r�rXr�r�r])rrF�NTr�)rKrBrCrLrr�rdr$r�rrrlr�rrr�r�r�r�r�rNrOrPs@r=rr�s[�����N��2"�N�`I�V
)�����$�*���H�Hr?c�a�]tRtRtoRtRtRRltRRltRRltRRlt	R	t278R279tRtRt
R
tRRlt]3RltRtRtRtRtVtR#)ri�z�StreamReaderWriter instances allow wrapping streams which280work in both read and write modes.281 282The design is such that one can use the factory functions283returned by the codec.lookup() function to construct the284instance.285 286�unknownc�R�WnV!W4VnV!W4VnW@nR#)a
Creates a StreamReaderWriter instance.287 288stream must be a Stream-like object.289 290Reader, Writer must be factory functions or classes291providing the StreamReader, StreamWriter interface resp.292 293Error handling is done in the same way as defined for the294StreamWriter/Readers.295 296N)r��reader�writerrX)r<r��Reader�WriterrXs&&&&&r=rd�StreamReaderWriter.__init__�s&�����V�,����V�,����r?c�8�VPPV4#r3)r,r�)r<r�s&&r=r��StreamReaderWriter.read�s���{�{����%�%r?Nc�8�VPPW4#r3)r,r)r<r�r�s&&&r=r�StreamReaderWriter.readline�s���{�{�#�#�D�3�3r?c�8�VPPW4#r3)r,r)r<rr�s&&&r=r�StreamReaderWriter.readlines�s���{�{�$�$�X�8�8r?c�,�\VP4#r)�nextr,rEs&r=r�StreamReaderWriter.__next__�s���D�K�K� � r?c��V#r3r\rEs&r=r�StreamReaderWriter.__iter__�r�r?c�8�VPPV4#r3)r-r�)r<r�s&&r=r��StreamReaderWriter.write�s���{�{� � ��&�&r?c�8�VPPV4#r3)r-r�r�s&&r=r��StreamReaderWriter.writelines�s���{�{�%�%�d�+�+r?c�n�VPP4VPP4R#r3�r,rlr-rEs&r=rl�StreamReaderWriter.reset��"�������������r?c���VPPW4VPP4V^8Xd&V^8XdVPP4R#R#R#r�)r�r�r,rlr-r�s&&&r=r��StreamReaderWriter.seek�sH��������(��������Q�;�6�Q�;��K�K����'�;r?c�(�V!VPV4#r�r�r�s&&&r=r��StreamReaderWriter.__getattr__�r�r?c��V#r3r\rEs&r=r��StreamReaderWriter.__enter__�r�r?c�:�VPP4R#r3r�r�s&&&&r=r��StreamReaderWriter.__exit__�r�r?c�N�\RVPP,4hr�r�r�s&&r=r�� StreamReaderWriter.__reduce_ex__�r�r?)rXr,r�r-r]�rr(r�)rKrBrCrLrM�encodingrdr�rrrrr�r�rlr�r�r�r�r�r�rNrOrPs@r=rr�sc������H��$&�4�9�!�297�'�,��298 �$�*���H�Hr?c�a�]tRtRtoRtRtRtRRltRRltRRlt	RRlt299R	tR300tRt
RtR
tRRlt]3RltRtRtRtRtVtR#)ri�a�StreamRecoder instances translate data from one encoding to another.301 302They use the complete set of APIs returned by the303codecs.lookup() function to implement their task.304 305Data written to the StreamRecoder is first decoded into an306intermediate format (depending on the "decode" codec) and then307written to the underlying stream using an instance of the provided308Writer class.309 310In the other direction, data is read from the underlying stream using311a Reader instance and then encoded and returned to the caller.312 313r*c�j�WnW nW0nV!W4VnV!W4VnW`nR#)a\Creates a StreamRecoder instance which implements a two-way314conversion: encode and decode work on the frontend (the315data visible to .read() and .write()) while Reader and Writer316work on the backend (the data in stream).317 318You can use these objects to do transparent319transcodings from e.g. latin-1 to utf-8 and back.320 321stream must be a file-like object.322 323encode and decode must adhere to the Codec interface; Reader and324Writer must be factory functions or classes providing the325StreamReader and StreamWriter interfaces resp.326 327Error handling is done in the same way as defined for the328StreamWriter/Readers.329 330N)r�r#r$r,r-rX)r<r�r#r$r.r/rXs&&&&&&&r=rd�StreamRecoder.__init__s0��*�������V�,����V�,����r?c�v�VPPV4pVPW P4wr#V#r3)r,r�r#rX�r<r�r��bytesencodeds&&  r=r��StreamRecoder.read/s0���{�{����%��!�[�[��{�{�;����r?Nc��VfVPP4pMVPPV4pVPW P4wr#V#r3)r,rr#rXrTs&&  r=r�StreamRecoder.readline5sG���<��;�;�'�'�)�D��;�;�'�'��-�D�!�[�[��{�{�;����r?c��VPP4pVPW P4wr#VP	RR7#)Tr�)r,r�r#rXr�)r<rr�rUs&&  r=r�StreamRecoder.readlines>s:���{�{���!��!�[�[��{�{�;��������-�-r?c�j�\VP4pVPWP4wrV#r)r8r,r#rX)r<r�rUs&  r=r�StreamRecoder.__next__Ds,���D�K�K� ��!�[�[��{�{�;����r?c��V#r3r\rEs&r=r�StreamRecoder.__iter__Kr�r?c�r�VPWP4wrVPPV4#r3)r$rXr-r�)r<r��bytesdecodeds&& r=r��StreamRecoder.writeNs,��!�[�[��{�{�;����{�{� � ��&�&r?c��RPV4pVPW P4wr#VPP	V4#)r?)r�r$rXr-r�)r<r�r�r`s&&  r=r��StreamRecoder.writelinesSs9���x�x��~��!�[�[��{�{�;����{�{� � ��&�&r?c�n�VPP4VPP4R#r3rArEs&r=rl�StreamRecoder.resetYrCr?c�r�VPPW4VPPW4R#r3)r,r�r-r�s&&&r=r��StreamRecoder.seek^s(��	
������(�������(r?c�(�V!VPV4#r�r�r�s&&&r=r��StreamRecoder.__getattr__dr�r?c��V#r3r\rEs&r=r��StreamRecoder.__enter__kr�r?c�:�VPP4R#r3r�r�s&&&&r=r��StreamRecoder.__exit__nr�r?c�N�\RVPP,4hr�r�r�s&&r=r��StreamRecoder.__reduce_ex__qr�r?)r$r#rXr,r�r-r]rNr3r�)rKrBrCrLrM�
data_encoding�
file_encodingrdr�rrrrr�r�rlr�r�r�r�r�r�rNrOrPs@r=rr�sh����
��M��M��8��.���'�331'��332)�$�*���H�Hr?r^c�2�^RIpVPR\^R7VeRV9d333VR,p\P!WV4pVfV#\V4p\
WgPVPV4pW(n	V# TP4h;i)a�Open an encoded file using the given mode and return334a wrapped version providing transparent encoding/decoding.335 336Note: The wrapped version will only accept the object format337defined by the codecs, i.e. Unicode objects for most builtin338codecs. Output is also codec dependent and will usually be339Unicode as well.340 341If encoding is not None, then the342underlying encoded files are always opened in binary mode.343The default file mode is 'r', meaning to open the file in read mode.344 345encoding specifies the encoding which is to be used for the346file.347 348errors may be given to define the error handling. It defaults349to 'strict' which causes ValueErrors to be raised in case an350encoding error occurs.351 352buffering has the same meaning as for the builtin open() API.353It defaults to -1 which means that the default buffer size will354be used.355 356The returned wrapped file object provides an extra attribute357.encoding which allows querying the used encoding. This358attribute is only available if an encoding was specified as359parameter.360Nz0codecs.open() is deprecated. Use open() instead.)�361stacklevel�b)�warnings�warn�DeprecationWarning�builtinsrrrr:r9rOr�)	�filename�moderOrX�	bufferingru�file�info�srws	&&&&&    r=rrvs���:��M�M�D�$���4���362�$���c�z���=�=���3�D�������h��� ��'8�'8�$�:K�:K�V�T�����363����364�365��
�s�3B�Bc���VfTp\V4p\V4p\WPVPVPVP366V4pWnW&nV#)a]Return a wrapped version of file which provides transparent367encoding translation.368 369Data written to the wrapped file is decoded according370to the given data_encoding and then encoded to the underlying371file using file_encoding. The intermediate data type372will usually be Unicode but depends on the specified codecs.373 374Bytes read from the file are decoded using file_encoding and then375passed back to the caller encoded using data_encoding.376 377If file_encoding is not given, it defaults to data_encoding.378 379errors may be given to define the error handling. It defaults380to 'strict' which causes ValueErrors to be raised in case an381encoding error occurs.382 383The returned wrapped file object provides two extra attributes384.data_encoding and .file_encoding which reflect the given385parameters of the same name. The attributes can be used for386introspection by Python programs.387 388)rrr#r$r:r9rprq)r|rprqrX�	data_info�	file_info�srs&&&&   r=rr�sd��2��%�
��}�%�I��}�%�I�	�t�-�-�y�/?�/?� �-�-�y�/E�/E�v�389O�B�%��$��
�Ir?c�,�\V4P#)z�Lookup up the codec for the given encoding and return390its encoder function.391 392Raises a LookupError in case the encoding cannot be found.393 394)rr#�rOs&r=rr�����(��"�"�"r?c�,�\V4P#)z�Lookup up the codec for the given encoding and return395its decoder function.396 397Raises a LookupError in case the encoding cannot be found.398 399)rr$r�s&r=rr�r�r?c�N�\V4PpVf\V4hV#)z�Lookup up the codec for the given encoding and return400its IncrementalEncoder class or factory function.401 402Raises a LookupError in case the encoding cannot be found403or the codecs doesn't provide an incremental encoder.404 405)rr7�LookupError)rO�encoders& r=rr��)���X��1�1�G����(�#�#��Nr?c�N�\V4PpVf\V4hV#)z�Lookup up the codec for the given encoding and return406its IncrementalDecoder class or factory function.407 408Raises a LookupError in case the encoding cannot be found409or the codecs doesn't provide an incremental decoder.410 411)rr8r�)rO�decoders& r=r r �r�r?c�,�\V4P#)z�Lookup up the codec for the given encoding and return412its StreamReader class or factory function.413 414Raises a LookupError in case the encoding cannot be found.415 416)rr:r�s&r=r!r!�����(��(�(�(r?c�,�\V4P#)z�Lookup up the codec for the given encoding and return417its StreamWriter class or factory function.418 419Raises a LookupError in case the encoding cannot be found.420 421)rr9r�s&r=r"r"	r�r?c+��"�\V4!V3/VBpVF"pVPV4pV'gKVx�K$	VPRR4pV'dVx�R#R#5i)z�422Encoding iterator.423 424Encodes the input strings from the iterator using an IncrementalEncoder.425 426errors and kwargs are passed through to the IncrementalEncoder427constructor.428raTN)rr#)�iteratorrOrX�kwargsr�rW�outputs&&&,   r=r%r%s\���$�H�-�f�?��?�G�������&���6��L���^�^�B��
%�F�
������.A�!A�Ac+��"�\V4!V3/VBpVF"pVPV4pV'gKVx�K$	VPRR4pV'dVx�R#R#5i)z�429Decoding iterator.430 431Decodes the input strings from the iterator using an IncrementalDecoder.432 433errors and kwargs are passed through to the IncrementalDecoder434constructor.435r?TN)r r$)r�rOrXr�r�rWr�s&&&,   r=r&r&%s\���$�H�-�f�?��?�G�������&���6��L���^�^�C��
&�F�
����r�c�0�VUu/uFqVbK	up#uupi)zsmake_identity_dict(rng) -> dict436 437Return a dictionary where elements of the rng sequence are438mapped to themselves.439 440r\)�rng�is& r=�make_identity_dictr�9s�����A�a�C�����s�c�\�/pVP4Fwr#W19gW!V&KRW&K	V#)aMCreates an encoding map from a decoding map.441 442If a target mapping in the decoding map occurs multiple443times, then that target is mapped to None (undefined mapping),444causing an exception when encountered by the charmap codec445during translation.446 447One example where this happens is cp875.py which decodes448multiple character to \u001a.449 450N)�items)�decoding_map�m�k�vs&   r=�make_encoding_mapr�Cs8��	�A��!�!�#����v��a�D��A�D�	$�451
�Hr?�ignore�replace�xmlcharrefreplace�backslashreplace�namereplace)�rNr^r)Nr^r])8rMrx�sys�_codecs�ImportError�why�SystemError�__all__rr	rrrrr�	byteorderrrrrr452r
rr4rrr�rryrr�rrrrrrrrrr r!r"r%r&r�r�r.r'r(r)r*r+r,�_false�	encodingsr\r?r=�<module>r�su����453�E��
-�:�
-�x�
-��
-��
-��
-�x�
-��
-��
-�!+�
-�-7�
-�9C�
-��
-�"�
-�$2�
-�4B�
-��
-�'�
-�)7�
-��	
-� �	
-�"6�	
-�8L�	
-�454�
-�455*�
-� �

-�"1�

-��
-�&�
-�(?�
-�#�
-�%0�
-�2=�
-��
-��
-� ,�
-�.:�
-��
-�,�
-�.>�
-�&�
-�%�
-�';�
-��
-�,�
-��0��$�#���$�#���#��#���=�=�H��#�"�C�)��I�456#�"�C�)��I���������457 �� �D@"�@"�D&��&�P "�!3� "�D/��/�b"�!3�"�VHH�5�HH�XxH�5�xH�xVH�VH�tsH�sH�n1�f"�L#�#���)�)��$�(�
�.�X�&�
��X�&�
��i�(��'�(;�<��&�'9�:��!�-�0��458��	��459��g"�E�460�=��C�461D�D��E�s�E8�8F�?F�F
codekingpro/portable-devtools · Team Ai