AlkantarClanX12

Your IP : 3.147.28.111


Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/codecs.cpython-33.pyo

�
��ft�c&@sndZddlZddlZyddlTWn5ek
rcZzede��WYddZ[XnXddddd	d
ddd
dddddddddddddddgZdZdZ	Z
dZZd Z
d!Zejd"kr�e
ZZe
ZneZZeZe
ZeZe
ZeZGd#d$�d$e�ZGd%d&�d&�ZGd'd(�d(e�ZGd)d*�d*e�ZGd+d,�d,e�ZGd-d.�d.e�ZGd/d0�d0e�ZGd1d2�d2e�Z Gd3d4�d4�Z!Gd5d6�d6�Z"d7dd8d9d:d�Z$dd8d;d�Z%d<d=�Z&d>d?�Z'd@dA�Z(dBdC�Z)dDdE�Z*dFdG�Z+d8dHdI�Z,d8dJdK�Z-dLdM�Z.dNdO�Z/y@e0d8�Z1e0dP�Z2e0dQ�Z3e0dR�Z4e0dS�Z5Wn0e6k
rdZ1dZ2dZ3dZ4dZ5YnXdZ7e7r+ddl8Z8ne9dTkrje%ej:dUdV�e_:e%ej;dVdU�e_;ndS(Wu� codecs -- Python Codec Registry, API and helpers.


Written by Marc-Andre Lemburg (mal@lemburg.com).

(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.

iN(u*u%Failed to load the builtin codecs: %suregisterulookupuopenuEncodedFileuBOMuBOM_BEuBOM_LEuBOM32_BEuBOM32_LEuBOM64_BEuBOM64_LEuBOM_UTF8u	BOM_UTF16uBOM_UTF16_LEuBOM_UTF16_BEu	BOM_UTF32uBOM_UTF32_LEuBOM_UTF32_BEu
strict_errorsu
ignore_errorsureplace_errorsuxmlcharrefreplace_errorsuregister_errorulookup_errorss��s��s��s��ulittlec	BsM|EeZdZdZdZddddddddd�Zdd�ZdS(	u	CodecInfou0Codec details when looking up the codec registryu_is_text_encodingc
Csytj|||||f�}	||	_||	_||	_||	_||	_||	_||	_|dk	ru||	_
n|	S(N(utupleu__new__unameuencodeudecodeuincrementalencoderuincrementaldecoderustreamwriterustreamreaderuNoneu_is_text_encoding(
uclsuencodeudecodeustreamreaderustreamwriteruincrementalencoderuincrementaldecoderunameu_is_text_encodinguself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__new__Vs							uCodecInfo.__new__cCs)d|jj|jj|jt|�fS(Nu&<%s.%s object for encoding %s at 0x%x>(u	__class__u
__module__u__name__unameuid(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__repr__esuCodecInfo.__repr__NT(	u__name__u
__module__u__qualname__u__doc__uTrueu_is_text_encodinguNoneu__new__u__repr__(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	CodecInfoKs

u	CodecInfocBs8|EeZdZdZddd�Zddd�ZdS(uCodecu� Defines the interface for stateless encoders/decoders.

        The .encode()/.decode() methods may use different error
        handling schemes by providing the errors argument. These
        string values are predefined:

         'strict' - raise a ValueError error (or a subclass)
         'ignore' - ignore the character and continue with the next
         'replace' - replace with a suitable replacement character;
                    Python will use the official U+FFFD REPLACEMENT
                    CHARACTER for the builtin Unicode codecs on
                    decoding and '?' on encoding.
         'surrogateescape' - replace with private codepoints U+DCnn.
         'xmlcharrefreplace' - Replace with the appropriate XML
                               character reference (only for encoding).
         'backslashreplace'  - Replace with backslashed escape sequences
                               (only for encoding).

        The set of allowed values can be extended via register_error.

    ustrictcCs
t�dS(u+ Encodes the object input and returns a tuple (output
            object, length consumed).

            errors defines the error handling to apply. It defaults to
            'strict' handling.

            The method may not store state in the Codec instance. Use
            StreamCodec for codecs which have to keep state in order to
            make encoding/decoding efficient.

            The encoder must be able to handle zero length input and
            return an empty object of the output object type in this
            situation.

        N(uNotImplementedError(uselfuinputuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyuencode�suCodec.encodecCs
t�dS(u� Decodes the object input and returns a tuple (output
            object, length consumed).

            input must be an object which provides the bf_getreadbuf
            buffer slot. Python strings, buffer objects and memory
            mapped files are examples of objects providing this slot.

            errors defines the error handling to apply. It defaults to
            'strict' handling.

            The method may not store state in the Codec instance. Use
            StreamCodec for codecs which have to keep state in order to
            make encoding/decoding efficient.

            The decoder must be able to handle zero length input and
            return an empty object of the output object type in this
            situation.

        N(uNotImplementedError(uselfuinputuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyudecode�suCodec.decodeN(u__name__u
__module__u__qualname__u__doc__uencodeudecode(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyuCodecjsuCodeccBs\|EeZdZdZddd�Zddd�Zdd�Zd	d
�Zdd�Z	d
S(uIncrementalEncoderu�
    An IncrementalEncoder encodes an input in multiple steps. The input can
    be passed piece by piece to the encode() method. The IncrementalEncoder
    remembers the state of the encoding process between calls to encode().
    ustrictcCs||_d|_dS(u�
        Creates an IncrementalEncoder instance.

        The IncrementalEncoder may use different error handling schemes by
        providing the errors keyword argument. See the module docstring
        for a list of possible values.
        uN(uerrorsubuffer(uselfuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__init__�s	uIncrementalEncoder.__init__cCs
t�dS(uA
        Encodes input and returns the resulting object.
        N(uNotImplementedError(uselfuinputufinal((u+/opt/alt/python33/lib64/python3.3/codecs.pyuencode�suIncrementalEncoder.encodecCsdS(u:
        Resets the encoder to the initial state.
        N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyureset�suIncrementalEncoder.resetcCsdS(u:
        Return the current state of the encoder.
        i((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyugetstate�suIncrementalEncoder.getstatecCsdS(ul
        Set the current state of the encoder. state must have been
        returned by getstate().
        N((uselfustate((u+/opt/alt/python33/lib64/python3.3/codecs.pyusetstate�suIncrementalEncoder.setstateNF(
u__name__u
__module__u__qualname__u__doc__u__init__uFalseuencodeuresetugetstateusetstate(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyuIncrementalEncoder�suIncrementalEncodercBsh|EeZdZdZddd�Zdd�Zddd�Zd	d
�Zdd�Z	d
d�Z
dS(uBufferedIncrementalEncoderu�
    This subclass of IncrementalEncoder can be used as the baseclass for an
    incremental encoder if the encoder must keep some of the output in a
    buffer between calls to encode().
    ustrictcCstj||�d|_dS(Nu(uIncrementalEncoderu__init__ubuffer(uselfuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__init__�su#BufferedIncrementalEncoder.__init__cCs
t�dS(N(uNotImplementedError(uselfuinputuerrorsufinal((u+/opt/alt/python33/lib64/python3.3/codecs.pyu_buffer_encode�su)BufferedIncrementalEncoder._buffer_encodecCsB|j|}|j||j|�\}}||d�|_|S(N(ubufferu_buffer_encodeuerrors(uselfuinputufinaludatauresultuconsumed((u+/opt/alt/python33/lib64/python3.3/codecs.pyuencode�s
u!BufferedIncrementalEncoder.encodecCstj|�d|_dS(Nu(uIncrementalEncoderuresetubuffer(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyureset�s
u BufferedIncrementalEncoder.resetcCs
|jpdS(Ni(ubuffer(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyugetstate�su#BufferedIncrementalEncoder.getstatecCs|p	d|_dS(Nu(ubuffer(uselfustate((u+/opt/alt/python33/lib64/python3.3/codecs.pyusetstate�su#BufferedIncrementalEncoder.setstateNF(u__name__u
__module__u__qualname__u__doc__u__init__u_buffer_encodeuFalseuencodeuresetugetstateusetstate(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyuBufferedIncrementalEncoder�suBufferedIncrementalEncodercBs\|EeZdZdZddd�Zddd�Zdd�Zd	d
�Zdd�Z	d
S(uIncrementalDecoderu�
    An IncrementalDecoder decodes an input in multiple steps. The input can
    be passed piece by piece to the decode() method. The IncrementalDecoder
    remembers the state of the decoding process between calls to decode().
    ustrictcCs
||_dS(u�
        Create a IncrementalDecoder instance.

        The IncrementalDecoder may use different error handling schemes by
        providing the errors keyword argument. See the module docstring
        for a list of possible values.
        N(uerrors(uselfuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__init__�suIncrementalDecoder.__init__cCs
t�dS(u@
        Decode input and returns the resulting object.
        N(uNotImplementedError(uselfuinputufinal((u+/opt/alt/python33/lib64/python3.3/codecs.pyudecodesuIncrementalDecoder.decodecCsdS(u9
        Reset the decoder to the initial state.
        N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyuresetsuIncrementalDecoder.resetcCsdS(u	
        Return the current state of the decoder.

        This must be a (buffered_input, additional_state_info) tuple.
        buffered_input must be a bytes object containing bytes that
        were passed to decode() that have not yet been converted.
        additional_state_info must be a non-negative integer
        representing the state of the decoder WITHOUT yet having
        processed the contents of buffered_input.  In the initial state
        and after reset(), getstate() must return (b"", 0).
        si(si((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyugetstatesuIncrementalDecoder.getstatecCsdS(u�
        Set the current state of the decoder.

        state must have been returned by getstate().  The effect of
        setstate((b"", 0)) must be equivalent to reset().
        N((uselfustate((u+/opt/alt/python33/lib64/python3.3/codecs.pyusetstatesuIncrementalDecoder.setstateNF(
u__name__u
__module__u__qualname__u__doc__u__init__uFalseudecodeuresetugetstateusetstate(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyuIncrementalDecoder�s
uIncrementalDecodercBsh|EeZdZdZddd�Zdd�Zddd�Zd	d
�Zdd�Z	d
d�Z
dS(uBufferedIncrementalDecoderu�
    This subclass of IncrementalDecoder can be used as the baseclass for an
    incremental decoder if the decoder must be able to handle incomplete
    byte sequences.
    ustrictcCstj||�d|_dS(Ns(uIncrementalDecoderu__init__ubuffer(uselfuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__init__,su#BufferedIncrementalDecoder.__init__cCs
t�dS(N(uNotImplementedError(uselfuinputuerrorsufinal((u+/opt/alt/python33/lib64/python3.3/codecs.pyu_buffer_decode1su)BufferedIncrementalDecoder._buffer_decodecCsB|j|}|j||j|�\}}||d�|_|S(N(ubufferu_buffer_decodeuerrors(uselfuinputufinaludatauresultuconsumed((u+/opt/alt/python33/lib64/python3.3/codecs.pyudecode6s
u!BufferedIncrementalDecoder.decodecCstj|�d|_dS(Ns(uIncrementalDecoderuresetubuffer(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyureset>s
u BufferedIncrementalDecoder.resetcCs
|jdfS(Ni(ubuffer(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyugetstateBsu#BufferedIncrementalDecoder.getstatecCs|d|_dS(Ni(ubuffer(uselfustate((u+/opt/alt/python33/lib64/python3.3/codecs.pyusetstateFsu#BufferedIncrementalDecoder.setstateNF(u__name__u
__module__u__qualname__u__doc__u__init__u_buffer_decodeuFalseudecodeuresetugetstateusetstate(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyuBufferedIncrementalDecoder&suBufferedIncrementalDecodercBs}|EeZdZddd�Zdd�Zdd�Zdd	�Zd
dd�Zed
d�Z	dd�Z
dd�ZdS(uStreamWriterustrictcCs||_||_dS(u[ Creates a StreamWriter instance.

            stream must be a file-like object open for writing
            (binary) data.

            The StreamWriter may use different error handling
            schemes by providing the errors keyword argument. These
            parameters are predefined:

             'strict' - raise a ValueError (or a subclass)
             'ignore' - ignore the character and continue with the next
             'replace'- replace with a suitable replacement character
             'xmlcharrefreplace' - Replace with the appropriate XML
                                   character reference.
             'backslashreplace'  - Replace with backslashed escape
                                   sequences (only for encoding).

            The set of allowed parameter values can be extended via
            register_error.
        N(ustreamuerrors(uselfustreamuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__init__Ss	uStreamWriter.__init__cCs/|j||j�\}}|jj|�dS(u> Writes the object's contents encoded to self.stream.
        N(uencodeuerrorsustreamuwrite(uselfuobjectudatauconsumed((u+/opt/alt/python33/lib64/python3.3/codecs.pyuwritelsuStreamWriter.writecCs|jdj|��dS(u[ Writes the concatenated list of strings to the stream
            using .write().
        uN(uwriteujoin(uselfulist((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
writelinesssuStreamWriter.writelinescCsdS(u5 Flushes and resets the codec buffers used for keeping state.

            Calling this method should ensure that the data on the
            output is put into a clean state, that allows appending
            of new fresh data without having to rescan the whole
            stream to recover state.

        N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyuresetzs
uStreamWriter.reseticCs<|jj||�|dkr8|dkr8|j�ndS(Ni(ustreamuseekureset(uselfuoffsetuwhence((u+/opt/alt/python33/lib64/python3.3/codecs.pyuseek�suStreamWriter.seekcCs||j|�S(u? Inherit all other methods from the underlying stream.
        (ustream(uselfunameugetattr((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__getattr__�suStreamWriter.__getattr__cCs|S(N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	__enter__�suStreamWriter.__enter__cCs|jj�dS(N(ustreamuclose(uselfutypeuvalueutb((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__exit__�suStreamWriter.__exit__N(u__name__u
__module__u__qualname__u__init__uwriteu
writelinesuresetuseekugetattru__getattr__u	__enter__u__exit__(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyuStreamWriterQsuStreamWritercBs�|EeZdZeZddd�Zddd�Zddddd�Zdd d	d
�Zdd dd�Zd
d�Z
ddd�Zdd�Zdd�Zedd�Zdd�Zdd�ZdS(!uStreamReaderustrictcCsC||_||_d|_|j�|_|j|_d|_dS(u[ Creates a StreamReader instance.

            stream must be a file-like object open for reading
            (binary) data.

            The StreamReader may use different error handling
            schemes by providing the errors keyword argument. These
            parameters are predefined:

             'strict' - raise a ValueError (or a subclass)
             'ignore' - ignore the character and continue with the next
             'replace'- replace with a suitable replacement character;

            The set of allowed parameter values can be extended via
            register_error.
        sN(ustreamuerrorsu
bytebufferucharbuffertypeu_empty_charbufferu
charbufferuNoneu
linebuffer(uselfustreamuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__init__�s			uStreamReader.__init__cCs
t�dS(N(uNotImplementedError(uselfuinputuerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyudecode�suStreamReader.decodeicCs�|jr-|jj|j�|_d|_nxk|dkrXt|j�|kr�Pq�n(|dkr�t|j�|kr�Pq�n|dkr�|jj�}n|jj|�}|j|}|s�Pny|j	||j
�\}}Wn�tk
rk}zc|rV|j	|d|j�|j
�\}}|j
dd�}	t|	�dkrY�qYn�WYdd}~XnX||d�|_|j|7_|s0Pq0q0|dkr�|j}
|j|_n)|jd|�}
|j|d�|_|
S(u Decodes data from the stream self.stream and returns the
            resulting object.

            chars indicates the number of characters to read from the
            stream. read() will never return more than chars
            characters, but it might return less, if there are not enough
            characters available.

            size indicates the approximate maximum number of bytes to
            read from the stream for decoding purposes. The decoder
            can modify this setting as appropriate. The default value
            -1 indicates to read and decode as much as possible.  size
            is intended to prevent having to decode huge files in one
            step.

            If firstline is true, and a UnicodeDecodeError happens
            after the first line terminator in the input only the first line
            will be returned, the rest of the input will be kept until the
            next call to read().

            The method should use a greedy read strategy meaning that
            it should read as much data as is allowed within the
            definition of the encoding and the given size, e.g.  if
            optional encoding endings or state markers are available
            on the stream, these should be read too.
        iNukeependsiT(u
linebufferu_empty_charbufferujoinu
charbufferuNoneulenustreamureadu
bytebufferudecodeuerrorsuUnicodeDecodeErrorustartu
splitlinesuTrue(uselfusizeucharsu	firstlineunewdataudataunewcharsudecodedbytesuexculinesuresult((u+/opt/alt/python33/lib64/python3.3/codecs.pyuread�sF	
(		uStreamReader.readc	
Cs�|jrt|jd}|jd=t|j�dkrQ|jd|_d
|_n|sp|jdd
�d}n|S|p}d}|j}x�|j|dd�}|rt	|t
�r�|jd�s�t	|t�r|jd�r||jddd	d�7}qn||7}|jdd�}|r+t|�dkr�|d}|d=t|�dkr�|d|j7<||_d
|_n|d|j|_|s�|jdd
�d}nPn|d}|djdd
�d}||kr+|jj
|dd
��|j|_|r|}n|}Pq+n|s>|d
k	rh|rd|rd|jdd
�d}nPn|dkr�|d9}q�q�|S(u� Read one line from the input stream and return the
            decoded data.

            size, if given, is passed as size argument to the
            read() method.

        iiukeependsiHu	firstlineu
s
usizeucharsNi@iFTi����(u
linebufferulenu
charbufferuNoneu
splitlinesuFalseu_empty_charbufferureaduTrueu
isinstanceustruendswithubytesujoin(	uselfusizeukeependsulineureadsizeudataulinesuline0withenduline0withoutend((u+/opt/alt/python33/lib64/python3.3/codecs.pyureadline	s^	

	"

	

	
uStreamReader.readlinecCs|j�}|j|�S(uZ Read all lines available on the input stream
            and return them as list of lines.

            Line breaks are implemented using the codec's decoder
            method and are included in the list entries.

            sizehint, if given, is ignored since there is no efficient
            way to finding the true end-of-line.

        (ureadu
splitlines(uselfusizehintukeependsudata((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	readlinesTsuStreamReader.readlinescCs"d|_|j|_d|_dS(u� Resets the codec buffers used for keeping state.

            Note that no stream repositioning should take place.
            This method is primarily intended to be able to recover
            from decoding errors.

        sN(u
bytebufferu_empty_charbufferu
charbufferuNoneu
linebuffer(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyuresetcs		uStreamReader.reseticCs!|jj||�|j�dS(up Set the input stream's current position.

            Resets the codec buffers used for keeping state.
        N(ustreamuseekureset(uselfuoffsetuwhence((u+/opt/alt/python33/lib64/python3.3/codecs.pyuseekpsuStreamReader.seekcCs |j�}|r|St�dS(u4 Return the next decoded line from the input stream.N(ureadlineu
StopIteration(uselfuline((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__next__xsuStreamReader.__next__cCs|S(N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__iter__�suStreamReader.__iter__cCs||j|�S(u? Inherit all other methods from the underlying stream.
        (ustream(uselfunameugetattr((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__getattr__�suStreamReader.__getattr__cCs|S(N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	__enter__�suStreamReader.__enter__cCs|jj�dS(N(ustreamuclose(uselfutypeuvalueutb((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__exit__�suStreamReader.__exit__Ni����i����FT(u__name__u
__module__u__qualname__ustrucharbuffertypeu__init__udecodeuFalseureaduNoneuTrueureadlineu	readlinesuresetuseeku__next__u__iter__ugetattru__getattr__u	__enter__u__exit__(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyuStreamReader�sOK
uStreamReadercBs�|EeZdZdZdZddd�Zd!dd�Zd d	d
�Zd dd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zddd�Zedd�Zdd�Zdd�Zd S("uStreamReaderWriteru StreamReaderWriter instances allow wrapping streams which
        work in both read and write modes.

        The design is such that one can use the factory functions
        returned by the codec.lookup() function to construct the
        instance.

    uunknownustrictcCs:||_|||�|_|||�|_||_dS(uR Creates a StreamReaderWriter instance.

            stream must be a Stream-like object.

            Reader, Writer must be factory functions or classes
            providing the StreamReader, StreamWriter interface resp.

            Error handling is done in the same way as defined for the
            StreamWriter/Readers.

        N(ustreamureaderuwriteruerrors(uselfustreamuReaderuWriteruerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__init__�s
	uStreamReaderWriter.__init__icCs|jj|�S(N(ureaderuread(uselfusize((u+/opt/alt/python33/lib64/python3.3/codecs.pyuread�suStreamReaderWriter.readcCs|jj|�S(N(ureaderureadline(uselfusize((u+/opt/alt/python33/lib64/python3.3/codecs.pyureadline�suStreamReaderWriter.readlinecCs|jj|�S(N(ureaderu	readlines(uselfusizehint((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	readlines�suStreamReaderWriter.readlinescCs
t|j�S(u4 Return the next decoded line from the input stream.(unextureader(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__next__�suStreamReaderWriter.__next__cCs|S(N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__iter__�suStreamReaderWriter.__iter__cCs|jj|�S(N(uwriteruwrite(uselfudata((u+/opt/alt/python33/lib64/python3.3/codecs.pyuwrite�suStreamReaderWriter.writecCs|jj|�S(N(uwriteru
writelines(uselfulist((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
writelines�suStreamReaderWriter.writelinescCs|jj�|jj�dS(N(ureaderuresetuwriter(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyureset�s
uStreamReaderWriter.reseticCsL|jj||�|jj�|dkrH|dkrH|jj�ndS(Ni(ustreamuseekureaderuresetuwriter(uselfuoffsetuwhence((u+/opt/alt/python33/lib64/python3.3/codecs.pyuseek�s
uStreamReaderWriter.seekcCs||j|�S(u? Inherit all other methods from the underlying stream.
        (ustream(uselfunameugetattr((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__getattr__�suStreamReaderWriter.__getattr__cCs|S(N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	__enter__�suStreamReaderWriter.__enter__cCs|jj�dS(N(ustreamuclose(uselfutypeuvalueutb((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__exit__�suStreamReaderWriter.__exit__Ni����(u__name__u
__module__u__qualname__u__doc__uencodingu__init__ureaduNoneureadlineu	readlinesu__next__u__iter__uwriteu
writelinesuresetuseekugetattru__getattr__u	__enter__u__exit__(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyuStreamReaderWriter�s	uStreamReaderWritercBs�|EeZdZdZdZdZddd�Zddd�Zdd	d
�Z	ddd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zedd�Zdd�Zdd�ZdS(u
StreamRecoderuE StreamRecoder instances provide a frontend - backend
        view of encoding data.

        They use the complete set of APIs returned by the
        codecs.lookup() function to implement their task.

        Data written to the stream is first decoded into an
        intermediate format (which is dependent on the given codec
        combination) and then written to the stream using an instance
        of the provided Writer class.

        In the other direction, data is read from the stream using a
        Reader instance and then return encoded data to the caller.

    uunknownustrictcCsL||_||_||_|||�|_|||�|_||_dS(u� Creates a StreamRecoder instance which implements a two-way
            conversion: encode and decode work on the frontend (the
            input to .read() and output of .write()) while
            Reader and Writer work on the backend (reading and
            writing to the stream).

            You can use these objects to do transparent direct
            recodings from e.g. latin-1 to utf-8 and back.

            stream must be a file-like object.

            encode, decode must adhere to the Codec interface, Reader,
            Writer must be factory functions or classes providing the
            StreamReader, StreamWriter interface resp.

            encode and decode are needed for the frontend translation,
            Reader and Writer for the backend translation. Unicode is
            used as intermediate encoding.

            Error handling is done in the same way as defined for the
            StreamWriter/Readers.

        N(ustreamuencodeudecodeureaderuwriteruerrors(uselfustreamuencodeudecodeuReaderuWriteruerrors((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__init__�s			uStreamRecoder.__init__icCs1|jj|�}|j||j�\}}|S(N(ureaderureaduencodeuerrors(uselfusizeudataubytesencoded((u+/opt/alt/python33/lib64/python3.3/codecs.pyureadsuStreamRecoder.readcCsO|dkr|jj�}n|jj|�}|j||j�\}}|S(N(uNoneureaderureadlineuencodeuerrors(uselfusizeudataubytesencoded((u+/opt/alt/python33/lib64/python3.3/codecs.pyureadline%s
uStreamRecoder.readlinecCs:|jj�}|j||j�\}}|jdd�S(NukeependsT(ureaderureaduencodeuerrorsu
splitlinesuTrue(uselfusizehintudataubytesencoded((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	readlines.suStreamRecoder.readlinescCs.t|j�}|j||j�\}}|S(u4 Return the next decoded line from the input stream.(unextureaderuencodeuerrors(uselfudataubytesencoded((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__next__4suStreamRecoder.__next__cCs|S(N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__iter__;suStreamRecoder.__iter__cCs+|j||j�\}}|jj|�S(N(udecodeuerrorsuwriteruwrite(uselfudataubytesdecoded((u+/opt/alt/python33/lib64/python3.3/codecs.pyuwrite>suStreamRecoder.writecCs:dj|�}|j||j�\}}|jj|�S(Nu(ujoinudecodeuerrorsuwriteruwrite(uselfulistudataubytesdecoded((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
writelinesCsuStreamRecoder.writelinescCs|jj�|jj�dS(N(ureaderuresetuwriter(uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyuresetIs
uStreamRecoder.resetcCs||j|�S(u? Inherit all other methods from the underlying stream.
        (ustream(uselfunameugetattr((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__getattr__NsuStreamRecoder.__getattr__cCs|S(N((uself((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	__enter__UsuStreamRecoder.__enter__cCs|jj�dS(N(ustreamuclose(uselfutypeuvalueutb((u+/opt/alt/python33/lib64/python3.3/codecs.pyu__exit__XsuStreamRecoder.__exit__Ni����(u__name__u
__module__u__qualname__u__doc__u
data_encodingu
file_encodingu__init__ureaduNoneureadlineu	readlinesu__next__u__iter__uwriteu
writelinesuresetugetattru__getattr__u	__enter__u__exit__(u
__locals__((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
StreamRecoder�s 	u
StreamRecoderurbustricticCs~|dk	r%d|kr%|d}ntj|||�}|dkrJ|St|�}t||j|j|�}||_|S(u� Open an encoded file using the given mode and return
        a wrapped version providing transparent encoding/decoding.

        Note: The wrapped version will only accept the object format
        defined by the codecs, i.e. Unicode objects for most builtin
        codecs. Output is also codec dependent and will usually be
        Unicode as well.

        Files are always opened in binary mode, even if no binary mode
        was specified. This is done to avoid data loss due to encodings
        using 8-bit values. The default file mode is 'rb' meaning to
        open the file in binary read mode.

        encoding specifies the encoding which is to be used for the
        file.

        errors may be given to define the error handling. It defaults
        to 'strict' which causes ValueErrors to be raised in case an
        encoding error occurs.

        buffering has the same meaning as for the builtin open() API.
        It defaults to line buffered.

        The returned wrapped file object provides an extra attribute
        .encoding which allows querying the used encoding. This
        attribute is only available if an encoding was specified as
        parameter.

    ubN(uNoneubuiltinsuopenulookupuStreamReaderWriterustreamreaderustreamwriteruencoding(ufilenameumodeuencodinguerrorsu	bufferingufileuinfousrw((u+/opt/alt/python33/lib64/python3.3/codecs.pyuopen]s
	cCsj|dkr|}nt|�}t|�}t||j|j|j|j|�}||_||_|S(u� Return a wrapped version of file which provides transparent
        encoding translation.

        Strings written to the wrapped file are interpreted according
        to the given data_encoding and then written to the original
        file as string using file_encoding. The intermediate encoding
        will usually be Unicode but depends on the specified codecs.

        Strings are read from the file using file_encoding and then
        passed back to the caller as string using data_encoding.

        If file_encoding is not given, it defaults to data_encoding.

        errors may be given to define the error handling. It defaults
        to 'strict' which causes ValueErrors to be raised in case an
        encoding error occurs.

        The returned wrapped file object provides two extra attributes
        .data_encoding and .file_encoding which reflect the given
        parameters of the same name. The attributes can be used for
        introspection by Python programs.

    N(	uNoneulookupu
StreamRecoderuencodeudecodeustreamreaderustreamwriteru
data_encodingu
file_encoding(ufileu
data_encodingu
file_encodinguerrorsu	data_infou	file_infousr((u+/opt/alt/python33/lib64/python3.3/codecs.pyuEncodedFile�s			cCs
t|�jS(u� Lookup up the codec for the given encoding and return
        its encoder function.

        Raises a LookupError in case the encoding cannot be found.

    (ulookupuencode(uencoding((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
getencoder�su
getencodercCs
t|�jS(u� Lookup up the codec for the given encoding and return
        its decoder function.

        Raises a LookupError in case the encoding cannot be found.

    (ulookupudecode(uencoding((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
getdecoder�su
getdecodercCs.t|�j}|dkr*t|��n|S(u� Lookup up the codec for the given encoding and return
        its IncrementalEncoder class or factory function.

        Raises a LookupError in case the encoding cannot be found
        or the codecs doesn't provide an incremental encoder.

    N(ulookupuincrementalencoderuNoneuLookupError(uencodinguencoder((u+/opt/alt/python33/lib64/python3.3/codecs.pyugetincrementalencoder�s	ugetincrementalencodercCs.t|�j}|dkr*t|��n|S(u� Lookup up the codec for the given encoding and return
        its IncrementalDecoder class or factory function.

        Raises a LookupError in case the encoding cannot be found
        or the codecs doesn't provide an incremental decoder.

    N(ulookupuincrementaldecoderuNoneuLookupError(uencodingudecoder((u+/opt/alt/python33/lib64/python3.3/codecs.pyugetincrementaldecoder�s	ugetincrementaldecodercCs
t|�jS(u� Lookup up the codec for the given encoding and return
        its StreamReader class or factory function.

        Raises a LookupError in case the encoding cannot be found.

    (ulookupustreamreader(uencoding((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	getreader�su	getreadercCs
t|�jS(u� Lookup up the codec for the given encoding and return
        its StreamWriter class or factory function.

        Raises a LookupError in case the encoding cannot be found.

    (ulookupustreamwriter(uencoding((u+/opt/alt/python33/lib64/python3.3/codecs.pyu	getwriter�su	getwritercksgt|�||�}x+|D]#}|j|�}|r|VqqW|jdd�}|rc|VndS(u�
    Encoding iterator.

    Encodes the input strings from the iterator using a IncrementalEncoder.

    errors and kwargs are passed through to the IncrementalEncoder
    constructor.
    uNT(ugetincrementalencoderuencodeuTrue(uiteratoruencodinguerrorsukwargsuencoderuinputuoutput((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
iterencode�s	
u
iterencodecksgt|�||�}x+|D]#}|j|�}|r|VqqW|jdd�}|rc|VndS(u�
    Decoding iterator.

    Decodes the input strings from the iterator using a IncrementalDecoder.

    errors and kwargs are passed through to the IncrementalDecoder
    constructor.
    sNT(ugetincrementaldecoderudecodeuTrue(uiteratoruencodinguerrorsukwargsudecoderuinputuoutput((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
iterdecodes	
u
iterdecodecCsdd�|D�S(u� make_identity_dict(rng) -> dict

        Return a dictionary where elements of the rng sequence are
        mapped to themselves.

    cSsi|]}||�qS(((u.0ui((u+/opt/alt/python33/lib64/python3.3/codecs.pyu
<dictcomp>!s	u&make_identity_dict.<locals>.<dictcomp>((urng((u+/opt/alt/python33/lib64/python3.3/codecs.pyumake_identity_dictsumake_identity_dictcCsJi}x=|j�D]/\}}||kr8|||<qd||<qW|S(u} Creates an encoding map from a decoding map.

        If a target mapping in the decoding map occurs multiple
        times, then that target is mapped to None (undefined mapping),
        causing an exception when encountered by the charmap codec
        during translation.

        One example where this happens is cp875.py which decodes
        multiple character to .

    N(uitemsuNone(udecoding_mapumukuv((u+/opt/alt/python33/lib64/python3.3/codecs.pyumake_encoding_map#s

umake_encoding_mapuignoreureplaceuxmlcharrefreplaceubackslashreplaceu__main__ulatin-1uutf-8(<u__doc__ubuiltinsusysu_codecsuImportErroruwhyuSystemErroru__all__uBOM_UTF8uBOM_LEuBOM_UTF16_LEuBOM_BEuBOM_UTF16_BEuBOM_UTF32_LEuBOM_UTF32_BEu	byteorderuBOMu	BOM_UTF16u	BOM_UTF32uBOM32_LEuBOM32_BEuBOM64_LEuBOM64_BEutupleu	CodecInfouCodecuobjectuIncrementalEncoderuBufferedIncrementalEncoderuIncrementalDecoderuBufferedIncrementalDecoderuStreamWriteruStreamReaderuStreamReaderWriteru
StreamRecoderuNoneuopenuEncodedFileu
getencoderu
getdecoderugetincrementalencoderugetincrementaldecoderu	getreaderu	getwriteru
iterencodeu
iterdecodeumake_identity_dictumake_encoding_mapulookup_erroru
strict_errorsu
ignore_errorsureplace_errorsuxmlcharrefreplace_errorsubackslashreplace_errorsuLookupErroru_falseu	encodingsu__name__ustdoutustdin(((u+/opt/alt/python33/lib64/python3.3/codecs.pyu<module>s�#		


	
A("1+I�Wt,&