Your IP : 216.73.216.134


Current Path : /opt/rh/rh-python35/root/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/rh/rh-python35/root/lib64/python3.5/__pycache__/codecs.cpython-35.opt-1.pyc



���\���:@s�dZddlZddlZyddlTWn5ek
rcZzede��WYddZ[XnXddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0g,Zd1Zd2Z	Z
d3ZZd4Z
d5Zejd6kr6e
ZZe
ZneZZeZe
ZeZe
ZeZGd7d�de�ZGd8d�d�ZGd9d�de�ZGd:d;�d;e�ZGd<d�de�ZGd=d>�d>e�ZGd?d�de�ZGd@d�de�Z GdAd�d�Z!GdBd�d�Z"dCddDdEdFd�Z#ddDdGd�Z$dHd�Z%dId �Z&dJd!�Z'dKd"�Z(dLd#�Z)dMd$�Z*dDdNd'�Z+dDdOd(�Z,dPdQ�Z-dRdS�Z.yLe/dD�Z0e/dT�Z1e/dU�Z2e/dV�Z3e/dW�Z4e/dX�Z5Wn6e6k
r]dZ0dZ1dZ2dZ3dZ4dZ5YnXdZ7e7rvddl8Z8e9dYkr�e$ej:dZd[�e_:e$ej;d[dZ�e_;dS)\z� codecs -- Python Codec Registry, API and helpers.


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

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

�N)�*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�
getencoder�
getdecoder�getincrementalencoder�getincrementaldecoder�	getreader�	getwriter�encode�decode�
iterencode�
iterdecode�
strict_errors�
ignore_errors�replace_errors�xmlcharrefreplace_errors�backslashreplace_errors�namereplace_errors�register_error�lookup_errorss��s��s��s���littlec	@sIeZdZdZdZddddddddd�Zdd�ZdS)	rz0Codec details when looking up the codec registryTN�_is_text_encodingc
Csvtj|||||f�}	||	_||	_||	_||	_||	_||	_||	_|dk	rr||	_	|	S)N)
�tuple�__new__�namer#r$�incrementalencoder�incrementaldecoder�streamwriter�streamreaderr0)
�clsr#r$r7r6r4r5r3r0�self�r:�6/opt/rh/rh-python35/root/usr/lib64/python3.5/codecs.pyr2]s								zCodecInfo.__new__cCs)d|jj|jj|jt|�fS)Nz%<%s.%s object for encoding %s at %#x>)�	__class__�
__module__�__qualname__r3�id)r9r:r:r;�__repr__lszCodecInfo.__repr__)�__name__r=r>�__doc__r0r2r@r:r:r:r;rRs
c@s4eZdZdZddd�Zddd�ZdS)ra9 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 code points U+DCnn.
         'xmlcharrefreplace' - Replace with the appropriate XML
                               character reference (only for encoding).
         'backslashreplace'  - Replace with backslashed escape sequences.
         'namereplace'       - Replace with \N{...} escape sequences
                               (only for encoding).

        The set of allowed values can be extended via register_error.

    �strictcCs
t�dS)a# 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
            StreamWriter for codecs which have to keep state in order to
            make encoding 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)�NotImplementedError)r9�input�errorsr:r:r;r#�szCodec.encodecCs
t�dS)a� 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
            StreamReader for codecs which have to keep state in order to
            make 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)rD)r9rErFr:r:r;r$�szCodec.decodeN)rAr=r>rBr#r$r:r:r:r;rqsc@sXeZdZdZddd�Zddd�Zdd	�Zd
d�Zdd
�ZdS)rz�
    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().
    rCcCs||_d|_dS)z�
        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.
        �N)rF�buffer)r9rFr:r:r;�__init__�s	zIncrementalEncoder.__init__FcCs
t�dS)zA
        Encodes input and returns the resulting object.
        N)rD)r9rE�finalr:r:r;r#�szIncrementalEncoder.encodecCsdS)z:
        Resets the encoder to the initial state.
        Nr:)r9r:r:r;�reset�szIncrementalEncoder.resetcCsdS)z:
        Return the current state of the encoder.
        rr:)r9r:r:r;�getstate�szIncrementalEncoder.getstatecCsdS)zl
        Set the current state of the encoder. state must have been
        returned by getstate().
        Nr:)r9�stater:r:r;�setstate�szIncrementalEncoder.setstateN)	rAr=r>rBrIr#rKrLrNr:r:r:r;r�sc@sdeZdZdZddd�Zdd�Zddd	�Zd
d�Zdd
�Zdd�Z	dS)�BufferedIncrementalEncoderz�
    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().
    rCcCstj||�d|_dS)NrG)rrIrH)r9rFr:r:r;rI�sz#BufferedIncrementalEncoder.__init__cCs
t�dS)N)rD)r9rErFrJr:r:r;�_buffer_encode�sz)BufferedIncrementalEncoder._buffer_encodeFcCsB|j|}|j||j|�\}}||d�|_|S)N)rHrPrF)r9rErJ�data�result�consumedr:r:r;r#�s
z!BufferedIncrementalEncoder.encodecCstj|�d|_dS)NrG)rrKrH)r9r:r:r;rK�s
z BufferedIncrementalEncoder.resetcCs
|jpdS)Nr)rH)r9r:r:r;rL�sz#BufferedIncrementalEncoder.getstatecCs|p	d|_dS)NrG)rH)r9rMr:r:r;rN�sz#BufferedIncrementalEncoder.setstateN)
rAr=r>rBrIrPr#rKrLrNr:r:r:r;rO�srOc@sXeZdZdZddd�Zddd�Zdd	�Zd
d�Zdd
�ZdS)rz�
    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().
    rCcCs
||_dS)z�
        Create an 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)rF)r9rFr:r:r;rIszIncrementalDecoder.__init__FcCs
t�dS)z@
        Decode input and returns the resulting object.
        N)rD)r9rErJr:r:r;r$
szIncrementalDecoder.decodecCsdS)z9
        Reset the decoder to the initial state.
        Nr:)r9r:r:r;rKszIncrementalDecoder.resetcCsdS)a	
        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).
        �r)rTrr:)r9r:r:r;rLszIncrementalDecoder.getstatecCsdS)z�
        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().
        Nr:)r9rMr:r:r;rN&szIncrementalDecoder.setstateN)	rAr=r>rBrIr$rKrLrNr:r:r:r;r�s
c@sdeZdZdZddd�Zdd�Zddd	�Zd
d�Zdd
�Zdd�Z	dS)�BufferedIncrementalDecoderz�
    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.
    rCcCstj||�d|_dS)NrT)rrIrH)r9rFr:r:r;rI4sz#BufferedIncrementalDecoder.__init__cCs
t�dS)N)rD)r9rErFrJr:r:r;�_buffer_decode9sz)BufferedIncrementalDecoder._buffer_decodeFcCsB|j|}|j||j|�\}}||d�|_|S)N)rHrVrF)r9rErJrQrRrSr:r:r;r$>s
z!BufferedIncrementalDecoder.decodecCstj|�d|_dS)NrT)rrKrH)r9r:r:r;rKFs
z BufferedIncrementalDecoder.resetcCs
|jdfS)Nr)rH)r9r:r:r;rLJsz#BufferedIncrementalDecoder.getstatecCs|d|_dS)Nr)rH)r9rMr:r:r;rNNsz#BufferedIncrementalDecoder.setstateN)
rAr=r>rBrIrVr$rKrLrNr:r:r:r;rU.srUc@syeZdZddd�Zdd�Zdd�Zdd	�Zd
dd�Zed
d�Z	dd�Z
dd�ZdS)rrCcCs||_||_dS)aw Creates a StreamWriter instance.

            stream must be a file-like object open for writing.

            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.
             'namereplace'       - Replace with \N{...} escape sequences.

            The set of allowed parameter values can be extended via
            register_error.
        N)�streamrF)r9rWrFr:r:r;rI[s	zStreamWriter.__init__cCs/|j||j�\}}|jj|�dS)z> Writes the object's contents encoded to self.stream.
        N)r#rFrW�write)r9�objectrQrSr:r:r;rXtszStreamWriter.writecCs|jdj|��dS)z[ Writes the concatenated list of strings to the stream
            using .write().
        rGN)rX�join)r9�listr:r:r;�
writelines{szStreamWriter.writelinescCsdS)a5 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.

        Nr:)r9r:r:r;rK�s
zStreamWriter.resetrcCs9|jj||�|dkr5|dkr5|j�dS)Nr)rW�seekrK)r9�offset�whencer:r:r;r]�szStreamWriter.seekcCs||j|�S)z? Inherit all other methods from the underlying stream.
        )rW)r9r3�getattrr:r:r;�__getattr__�szStreamWriter.__getattr__cCs|S)Nr:)r9r:r:r;�	__enter__�szStreamWriter.__enter__cCs|jj�dS)N)rW�close)r9�type�value�tbr:r:r;�__exit__�szStreamWriter.__exit__N)rAr=r>rIrXr\rKr]r`rarbrgr:r:r:r;rYsc@s�eZdZeZddd�Zddd�Zdd ddd	�Zd
ddd
�Zd
ddd�Z	dd�Z
ddd�Zdd�Zdd�Z
edd�Zdd�Zdd�Zd
S)!rrCcCsC||_||_d|_|j�|_|j|_d|_dS)a� Creates a StreamReader instance.

            stream must be a file-like object open for reading.

            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
             'backslashreplace' - Replace with backslashed escape sequences;

            The set of allowed parameter values can be extended via
            register_error.
        rTN)rWrF�
bytebuffer�charbuffertype�_empty_charbuffer�
charbuffer�
linebuffer)r9rWrFr:r:r;rI�s			zStreamReader.__init__cCs
t�dS)N)rD)r9rErFr:r:r;r$�szStreamReader.decode�FcCs�|jr*|jj|j�|_d|_xZ|dkrRt|j�|krtPn"|dkrtt|j�|krtP|dkr�|jj�}n|jj|�}|j|}|s�Py|j||j	�\}}Wn�t
k
rY}z`|rD|j|d|j�|j	�\}}|jdd�}	t|	�dkrG�n�WYdd}~XnX||d�|_|j|7_|s-Pq-W|dkr�|j}
|j|_n)|jd|�}
|j|d�|_|
S)a� Decodes data from the stream self.stream and returns the
            resulting object.

            chars indicates the number of decoded code points or bytes to
            return. read() will never return more data than requested,
            but it might return less, if there is not enough available.

            size indicates the approximate maximum number of decoded
            bytes or code points to read for decoding. 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.
        Nr�keependsTrm)
rlrjrZrk�lenrW�readrhr$rF�UnicodeDecodeError�start�
splitlines)r9�size�chars�	firstline�newdatarQ�newchars�decodedbytes�exc�linesrRr:r:r;rp�sF		
(	zStreamReader.readNTc	Csh|jrn|jd}|jd=t|j�dkrN|jd|_d|_|sj|jdd�d}|S|pwd}|j}x�|j|dd�}|r�t|t�r�|jd	�s�t|t	�r�|jd
�r�||jdddd�7}||7}|jdd�}|rt|�dkr�|d}|d=t|�dkrv|d|j7<||_d|_n|d|j|_|s�|jdd�d}P|d}|djdd�d}||kr|jj
|dd��|j|_|r|}n|}P|s&|dk	rJ|rI|rI|jdd�d}P|d
kr�|d9}q�W|S)z� Read one line from the input stream and return the
            decoded data.

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

        rrmNrnF�HrvT�
s
rtrui@����)rlrorkrsrjrp�
isinstance�str�endswith�bytesrZ)	r9rtrn�line�readsizerQr{�line0withend�line0withoutendr:r:r;�readlines^	

		

	

	
zStreamReader.readlinecCs|j�}|j|�S)aS Read all lines available on the input stream
            and return them as a list.

            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.

        )rprs)r9�sizehintrnrQr:r:r;�	readlines[szStreamReader.readlinescCs"d|_|j|_d|_dS)z� 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.

        rTN)rhrjrkrl)r9r:r:r;rKjs		zStreamReader.resetrcCs!|jj||�|j�dS)zp Set the input stream's current position.

            Resets the codec buffers used for keeping state.
        N)rWr]rK)r9r^r_r:r:r;r]wszStreamReader.seekcCs |j�}|r|St�dS)z4 Return the next decoded line from the input stream.N)r��
StopIteration)r9r�r:r:r;�__next__szStreamReader.__next__cCs|S)Nr:)r9r:r:r;�__iter__�szStreamReader.__iter__cCs||j|�S)z? Inherit all other methods from the underlying stream.
        )rW)r9r3r`r:r:r;ra�szStreamReader.__getattr__cCs|S)Nr:)r9r:r:r;rb�szStreamReader.__enter__cCs|jj�dS)N)rWrc)r9rdrerfr:r:r;rg�szStreamReader.__exit__rr)rAr=r>r�rirIr$rpr�r�rKr]r�r�r`rarbrgr:r:r:r;r�sNK
c@s�eZdZdZdZddd�Zd!dd�Zd	d
d�Zd	dd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
ddd�Zedd�Zdd�Zdd �Zd	S)"ra 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.

    �unknownrCcCs:||_|||�|_|||�|_||_dS)aR 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)rW�reader�writerrF)r9rW�Reader�WriterrFr:r:r;rI�s
	zStreamReaderWriter.__init__rmcCs|jj|�S)N)r�rp)r9rtr:r:r;rp�szStreamReaderWriter.readNcCs|jj|�S)N)r�r�)r9rtr:r:r;r��szStreamReaderWriter.readlinecCs|jj|�S)N)r�r�)r9r�r:r:r;r��szStreamReaderWriter.readlinescCs
t|j�S)z4 Return the next decoded line from the input stream.)�nextr�)r9r:r:r;r��szStreamReaderWriter.__next__cCs|S)Nr:)r9r:r:r;r��szStreamReaderWriter.__iter__cCs|jj|�S)N)r�rX)r9rQr:r:r;rX�szStreamReaderWriter.writecCs|jj|�S)N)r�r\)r9r[r:r:r;r\�szStreamReaderWriter.writelinescCs|jj�|jj�dS)N)r�rKr�)r9r:r:r;rK�s
zStreamReaderWriter.resetrcCsI|jj||�|jj�|dkrE|dkrE|jj�dS)Nr)rWr]r�rKr�)r9r^r_r:r:r;r]�s
zStreamReaderWriter.seekcCs||j|�S)z? Inherit all other methods from the underlying stream.
        )rW)r9r3r`r:r:r;ra�szStreamReaderWriter.__getattr__cCs|S)Nr:)r9r:r:r;rb�szStreamReaderWriter.__enter__cCs|jj�dS)N)rWrc)r9rdrerfr:r:r;rg�szStreamReaderWriter.__exit__r)rAr=r>rB�encodingrIrpr�r�r�r�rXr\rKr]r`rarbrgr:r:r:r;r�s	c@s�eZdZdZdZdZddd�Zddd�Zd	d
d�Zd	dd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zedd�Zdd�Zdd�Zd	S)raB StreamRecoder instances translate data from one encoding to another.

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

        Data written to the StreamRecoder is first decoded into an
        intermediate format (depending on the "decode" codec) and then
        written to the underlying stream using an instance of the provided
        Writer class.

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

    r�rCcCsL||_||_||_|||�|_|||�|_||_dS)a� Creates a StreamRecoder instance which implements a two-way
            conversion: encode and decode work on the frontend (the
            data visible to .read() and .write()) while Reader and Writer
            work on the backend (the data in stream).

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

            stream must be a file-like object.

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

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

        N)rWr#r$r�r�rF)r9rWr#r$r�r�rFr:r:r;rIs			zStreamRecoder.__init__rmcCs1|jj|�}|j||j�\}}|S)N)r�rpr#rF)r9rtrQ�bytesencodedr:r:r;rp szStreamRecoder.readNcCsO|dkr|jj�}n|jj|�}|j||j�\}}|S)N)r�r�r#rF)r9rtrQr�r:r:r;r�&s
zStreamRecoder.readlinecCs:|jj�}|j||j�\}}|jdd�S)NrnT)r�rpr#rFrs)r9r�rQr�r:r:r;r�/szStreamRecoder.readlinescCs.t|j�}|j||j�\}}|S)z4 Return the next decoded line from the input stream.)r�r�r#rF)r9rQr�r:r:r;r�5szStreamRecoder.__next__cCs|S)Nr:)r9r:r:r;r�<szStreamRecoder.__iter__cCs+|j||j�\}}|jj|�S)N)r$rFr�rX)r9rQ�bytesdecodedr:r:r;rX?szStreamRecoder.writecCs:dj|�}|j||j�\}}|jj|�S)NrG)rZr$rFr�rX)r9r[rQr�r:r:r;r\DszStreamRecoder.writelinescCs|jj�|jj�dS)N)r�rKr�)r9r:r:r;rKJs
zStreamRecoder.resetcCs||j|�S)z? Inherit all other methods from the underlying stream.
        )rW)r9r3r`r:r:r;raOszStreamRecoder.__getattr__cCs|S)Nr:)r9r:r:r;rbVszStreamRecoder.__enter__cCs|jj�dS)N)rWrc)r9rdrerfr:r:r;rgYszStreamRecoder.__exit__r)rAr=r>rB�
data_encoding�
file_encodingrIrpr�r�r�r�rXr\rKr`rarbrgr:r:r:r;r�s	�rrCrmcCs{|dk	r"d|kr"|d}tj|||�}|dkrG|St|�}t||j|j|�}||_|S)a> 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.

        Underlying encoded files are always opened in binary mode.
        The default file mode is 'r', meaning to open the file in 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.

    N�b)�builtinsrrrr7r6r�)�filename�moder�rF�	buffering�file�info�srwr:r:r;r^s
	cCsg|dkr|}t|�}t|�}t||j|j|j|j|�}||_||_|S)a� Return a wrapped version of file which provides transparent
        encoding translation.

        Data written to the wrapped file is decoded according
        to the given data_encoding and then encoded to the underlying
        file using file_encoding. The intermediate data type
        will usually be Unicode but depends on the specified codecs.

        Bytes read from the file are decoded using file_encoding and then
        passed back to the caller encoded 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)rrr#r$r7r6r�r�)r�r�r�rF�	data_info�	file_info�srr:r:r;r�s		cCs
t|�jS)z� Lookup up the codec for the given encoding and return
        its encoder function.

        Raises a LookupError in case the encoding cannot be found.

    )rr#)r�r:r:r;r�scCs
t|�jS)z� Lookup up the codec for the given encoding and return
        its decoder function.

        Raises a LookupError in case the encoding cannot be found.

    )rr$)r�r:r:r;r�scCs+t|�j}|dkr't|��|S)z� 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)rr4�LookupError)r��encoderr:r:r;r�s	cCs+t|�j}|dkr't|��|S)z� 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)rr5r�)r��decoderr:r:r;r �s	cCs
t|�jS)z� 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.

    )rr7)r�r:r:r;r!�scCs
t|�jS)z� 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.

    )rr6)r�r:r:r;r"�scksat|�||�}x(|D] }|j|�}|r|VqW|jdd�}|r]|VdS)z�
    Encoding iterator.

    Encodes the input strings from the iterator using an IncrementalEncoder.

    errors and kwargs are passed through to the IncrementalEncoder
    constructor.
    rGTN)rr#)�iteratorr�rF�kwargsr�rE�outputr:r:r;r%�s	
	cksat|�||�}x(|D] }|j|�}|r|VqW|jdd�}|r]|VdS)z�
    Decoding iterator.

    Decodes the input strings from the iterator using an IncrementalDecoder.

    errors and kwargs are passed through to the IncrementalDecoder
    constructor.
    rTTN)r r$)r�r�rFr�r�rEr�r:r:r;r&s	
	cCsdd�|D�S)z� make_identity_dict(rng) -> dict

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

    cSsi|]}||�qSr:r:)�.0�ir:r:r;�
<dictcomp> s	z&make_identity_dict.<locals>.<dictcomp>r:)�rngr:r:r;�make_identity_dictsr�cCsJi}x=|j�D]/\}}||kr8|||<qd||<qW|S)a� 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 \u001a.

    N)�items)�decoding_map�m�k�vr:r:r;�make_encoding_map"s

r��ignore�replace�xmlcharrefreplace�backslashreplace�namereplace�__main__zlatin-1zutf-8)<rBr��sys�_codecs�ImportErrorZwhy�SystemError�__all__rr	rrrrr�	byteorderrrrrr
r
rr1rrrYrrOrrUrrrrrrrrrr r!r"r%r&r�r�r.r'r(r)r*r+r,r��_false�	encodingsrA�stdout�stdinr:r:r:r;�<module>s�#				


	
B("1+I�Wn*&







Rosenblum TV: Video training, virtual workshops, classes, tutorials
logologologologo
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact

RE-INVENTING THE TELEVISION NEWS BUSINESS*

A revolution in video storytelling

Creating entirely new & cost-effective production methods

From the world leaders in video production training and the creators of Character Driven Storytelling™

*and every other business that uses video

WHAT WE DO

Over the past 35 years, we have designed, built or restructured some of the most powerful news and journalism companies in the world.

We replace the traditional TV news ‘crew’ with one highly trained journalist, working alone with nothing but an iPhone.

No more TV news ‘crews’, no editors and no field producers.

This is television news done the way newspaper journalism is done – one reporter with their electronic pad and pencil.

In doing this, we can cut the cost of production by as much as 75% while increasing ratings and audience engagement.

In the place of conventional TV news ‘packages’ – ie, reporter stand up, interview, b-roll, man on the street, we marry great journalism with Netflix and Hollywood storytelling.

It’s a combination that works.

We have taken most of our clients to #1 in their respective markets.

And it’s not just for news. Any company, any profit, any NGO and anyone else who is online needs to tell their story in compelling yet cost-effective video. We can teach you to do that. Either in person or virtually.

EXAMPLES OF WHAT WE CAN TEACH YOUR STAFF TO PRODUCE

ITAY HOD

Itay Hod, MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2018.

Because he works alone, with only an iPhone, he was able to embed himself with a homeless family.

Here’s the story he produced in a one-day turn.

KIET DO

Kiet Do, an MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2021.

Here is a story he produced, all on his own, with only an iPhone and in a one-day turn.

TAYLOR SCHAUB

Taylor Schaub, an MMJ with Spectrum News 1 in LA, took the 5-Day Intensive Video Storytelling Bootcamp in 2023.

Here is a story he turned in only one day, using only an iPhone. It was the first video story he ever did and it was nominated for an Emmy.

THE BOOTCAMP

How do we convert stations and whole networks to working in this way?

Since 1988, we have run intensive 5-Day Video Storytelling Bootcamps

We have done these all over the world.

These are hands-on bootcamps, and participants learn an entirely new way of creating TV news stories.

-We shoot at a 3:1 ratio or lower, so turnaround times are fast.

-We go directly from camera to timelilne and edit – no written scripts.  We work in the medium of pictures and sound.

-We are entirely character-driven.

-We are driven by pictures and real events.

-We are focused almost entirely on ’the viewer experience’.

Since 1988, more than 70,000 journalists around the world have taken our bootcamps, either in person on virtualy.

Case Studies

CBS Case Study Logos
CBS News

We have started to work with CBS News, bringing our ideas of character-driven storytelling to one of the most successful and biggest networks in the United States. Since beginning to work with them ratings have climbed and more importantly, audience engagement is through the ceiling.

Learn More
NYT Case Study Logos
New York Times Television

We started New York Times Television in 1990 and it was the first paper to be brought into the world of TV. It quickly became one of the most successful non-fiction production companies in the United States. The series and documentaries we produced won many awards including multiple Emmys.

Learn More
BBC Case Study Logos
The BBC

We have been working with the BBC since the year 2000 helping to convert their national news network to our visual storytelling technique. Most recently we have trained teams from their sports, documentaries, and comedy divisions to make character-driven stories using only smartphones.

Learn More
Spectrum Case Study Logos
Spectrum News

For the past five years we have worked with Spectrum News to introduce and train their journalists on visual, character driven storytelling using smartphones helping to create a different kind of local news for their network of 24-Hour News Stations across the United States.

Learn More
UN Case Study Logos
The United Nations

In 2006, we were approached by the United Nations. Rather than rely on news outlets, it would be much easier to train the field operatives to produce their own stories. We spent two years working with the UN, training more than 100 of their staff in bootcamps in Geneva and Nairobi.

Learn More
Star Ledger Case Study Logos
The Newark Star-Ledger

We trained 50 print reporters at the paper to shoot and tell their own stories, in conjunction with their print work. We built a TV newsroom in their existing print newsroom – you could not ask for a better set and they began to live stream their stories in conjunction with their print work.

Learn More
Mcgraw Hill Case Study Logos
Mcgraw Hill

We spent two years with McGraw Hill, training more than 150 of their staffers, making them completely video literate. McGraw/Hill media properties we transit included Business Week, Aviation Week, (what was the name of the architecture magazine), and JD Power and Associates.

Learn More
VOA Case Study Logos
Voice of America

In 1990, we were approached by The Voice of America, the official broadcasting agency for the United States Government. When we met with VOA, they were only a short wave radio broadcaster, but working with them, we took them into television, launching VOA-TV.

Learn More
Oyster Case Study Logos
Oyster Yachts

British based Oyster Yachts makes some of the finest yachts in the world. Like every other company, they had to find a way to feed the never-ending video demands of social media – sites like Instagram and TikTok. We trained the Oyster staff to tell their own stories, using only iPhones.

Learn More
SEPA Case Study Logos
Scottish Environmental Protection Agency

We were approached by SEPA, the Scottish Environmental Protection Agency because they had to continually find a way to ‘feed the media beast’. The result was that SEPA was able to tell their own stories, whenever they wanted, and at almost no additional cost.

Learn More
Image 11-11-22 at 6.25 PM

Michael on Media

Michael Rosenblum has been writing about the media since 1988. His work and ideas have appeared in The Guardian, The Huffington Post, Ilkeston Life and many other publications.

He has been blogging regularly for the past 35 years on this subject. Having taught media studies at Columbia University, NYU and now the University of Oxford, he is considered an expert on this subject.

Continue reading this post or look back at previous posts.

Read More

Do You Have Questions About Learning Video Skills?

If you would like to know more about our courses contact us and one of our training advisors will be happy to call you.

Contact Us

Copyright 2024. All rights reserved.