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__/optparse.cpython-35.opt-2.pyc



���\���@s�dZddddddddd	d
ddd
dddgZdZddlZddlZddlZdd�ZyddlmZmZWn*e	k
r�dd�Zdd�ZYnXeZ
Gdd�de�ZGdd
�d
e�Z
Gdd�de
�ZGdd�de�ZGdd�de�ZGd d!�d!e�ZGd"d	�d	�ZGd#d
�d
e�ZGd$d�de�Zd%d&�Zd'd(�Zd)ee
d*�fd+ee
d*�fd,ee
d-�fd.ee
d.�fiZd/d0�Zd1d2�Zd3d4fZGd5d�d�Zd6d7Zd6d8ZGd9d�d�Z Gd:d�d�Z!Gd;d�de!�Z"Gd<d�de!�Z#d=d>�Z$eZ%dS)?z1.5.3�Option�make_option�
SUPPRESS_HELP�SUPPRESS_USAGE�Values�OptionContainer�OptionGroup�OptionParser�
HelpFormatter�IndentedHelpFormatter�TitledHelpFormatter�
OptParseError�OptionError�OptionConflictError�OptionValueError�BadOptionErrora"
Copyright (c) 2001-2006 Gregory P. Ward.  All rights reserved.
Copyright (c) 2002-2006 Python Software Foundation.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

  * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

  * Neither the name of the author nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
�NcCsd|jjt|�|fS)Nz<%s at 0x%x: %s>)�	__class__�__name__�id)�self�r�8/opt/rh/rh-python35/root/usr/lib64/python3.5/optparse.py�_reprNsr)�gettext�ngettextcCs|S)Nr)�messagerrrr[srcCs|dkr|S|S)N�r)ZsingularZplural�nrrrr^src@s(eZdZdd�Zdd�ZdS)rcCs
||_dS)N)�msg)rrrrr�__init__gszOptParseError.__init__cCs|jS)N)r)rrrr�__str__jszOptParseError.__str__N)r�
__module__�__qualname__rr rrrrrfsc@s(eZdZdd�Zdd�ZdS)r
cCs||_t|�|_dS)N)r�str�	option_id)rr�optionrrrrts	zOptionError.__init__cCs(|jrd|j|jfS|jSdS)Nz
option %s: %s)r$r)rrrrr xs	zOptionError.__str__N)rr!r"rr rrrrr
nsc@seZdZdS)rN)rr!r"rrrrr~sc@seZdZdS)rN)rr!r"rrrrr�sc@s(eZdZdd�Zdd�ZdS)rcCs
||_dS)N)�opt_str)rr&rrrr�szBadOptionError.__init__cCstd�|jS)Nzno such option: %s)�_r&)rrrrr �szBadOptionError.__str__N)rr!r"rr rrrrr�sc@s(eZdZdd�Zdd�ZdS)�AmbiguousOptionErrorcCstj||�||_dS)N)rr�
possibilities)rr&r)rrrr�szAmbiguousOptionError.__init__cCs#td�|jdj|j�fS)Nzambiguous option: %s (%s?)z, )r'r&�joinr))rrrrr �s	zAmbiguousOptionError.__str__N)rr!r"rr rrrrr(�sr(c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd S)!r	ZnonecCs�d|_||_|dkr`yttjd�}Wnttfk
rUd}YnX|d8}||_t|t	|d|d��|_
|_d|_d|_
d|_||_d|_i|_d|_d|_dS)	NZCOLUMNS�P��rz%defaultz%s %sz%s=%s)�parser�indent_increment�int�os�environ�KeyError�
ValueError�width�min�max�
help_position�max_help_position�current_indent�level�
help_width�short_first�default_tag�option_strings�_short_opt_fmt�
_long_opt_fmt)rr/r9r5r=rrrr�s$		
	*							zHelpFormatter.__init__cCs
||_dS)N)r.)rr.rrr�
set_parser�szHelpFormatter.set_parsercCs1|dkrtd|��d|d|_dS)N�� z/invalid metavar delimiter for short options: %rz%s)rCrD)r4r@)r�delimrrr�set_short_opt_delimiter�s
z%HelpFormatter.set_short_opt_delimitercCs1|dkrtd|��d|d|_dS)N�=rDz.invalid metavar delimiter for long options: %rz%s)rGrD)r4rA)rrErrr�set_long_opt_delimiter�s
z$HelpFormatter.set_long_opt_delimitercCs%|j|j7_|jd7_dS)Nr)r:r/r;)rrrr�indent�szHelpFormatter.indentcCs%|j|j8_|jd8_dS)Nr)r:r/r;)rrrr�dedent�szHelpFormatter.dedentcCstd��dS)Nzsubclasses must implement)�NotImplementedError)r�usagerrr�format_usage�szHelpFormatter.format_usagecCstd��dS)Nzsubclasses must implement)rK)r�headingrrr�format_headingszHelpFormatter.format_headingcCsBt|j|jd�}d|j}tj||d|d|�S)N�rDZinitial_indentZsubsequent_indent)r7r5r:�textwrapZfill)r�textZ
text_widthrIrrr�_format_texts
	zHelpFormatter._format_textcCs|r|j|�dSdSdS)N�
rC)rS)r�descriptionrrr�format_descriptionsz HelpFormatter.format_descriptioncCs#|rd|j|�dSdSdS)NrTrC)rS)r�epilogrrr�
format_epilogszHelpFormatter.format_epilogcCsu|jdks|jr |jS|jjj|j�}|tksP|dkrY|j}|jj|jt	|��S)N)
r.r>�help�defaults�get�dest�
NO_DEFAULT�NO_DEFAULT_VALUE�replacer#)rr%Z
default_valuerrr�expand_defaults	zHelpFormatter.expand_defaultcs)g}�j|}�j�jd}t|�|kr[d�jd|f}�j}nd�jd||f}d}|j|�|jr��j|�}tj|�j	�}|jd|d|df�|j
�fdd�|dd�D��n|d
d	kr|jd	�dj|�S)Nr,z%*s%s
rCz	%*s%-*s  rcs&g|]}d�jd|f�qS)z%*s%s
rC)r8)�.0�line)rrr�
<listcomp>Ds	z/HelpFormatter.format_option.<locals>.<listcomp>rrT���)r?r8r:�len�appendrYr`rQZwrapr<�extendr*)rr%�result�optsZ	opt_widthZindent_firstZ	help_textZ
help_linesr)rr�
format_option's$

	
zHelpFormatter.format_optioncCs|j�d}xI|jD]>}|j|�}||j|<t|t|�|j�}qW|j�x]|jD]R}xI|jD]>}|j|�}||j|<t|t|�|j�}q�WqpW|j�|j�t	|d|j
�|_t|j|jd�|_
dS)Nrr,rP)rI�option_list�format_option_stringsr?r7rer:�
option_groupsrJr6r9r8r5r<)rr.Zmax_len�optZstrings�grouprrr�store_option_stringsJs 

 

$

z"HelpFormatter.store_option_stringscs�|j�re|jp!|jj����fdd�|jD�}��fdd�|jD�}n|j}|j}�jr�||}n
||}dj|�S)Ncs#g|]}�j|�f�qSr)r@)raZsopt)�metavarrrrrc`s	z7HelpFormatter.format_option_strings.<locals>.<listcomp>cs#g|]}�j|�f�qSr)rA)raZlopt)rqrrrrcbs	z, )�takes_valuerqr\�upper�_short_opts�
_long_optsr=r*)rr%Z
short_optsZ	long_optsrir)rqrrrl\s
			

z#HelpFormatter.format_option_stringsN)rr!r"r^rrBrFrHrIrJrMrOrSrVrXr`rjrprlrrrrr	�s +
#c@s@eZdZdddddd�Zdd�Zd	d
�ZdS)r
r,�NrcCstj|||||�dS)N)r	r)rr/r9r5r=rrrrsszIndentedHelpFormatter.__init__cCstd�|S)Nz
Usage: %s
)r')rrLrrrrM{sz"IndentedHelpFormatter.format_usagecCsd|jd|fS)Nz%*s%s:
rC)r:)rrNrrrrO~sz$IndentedHelpFormatter.format_heading)rr!r"rrMrOrrrrr
osc@s@eZdZdddddd�Zdd�Zdd	�ZdS)
rrrvNcCstj|||||�dS)N)r	r)rr/r9r5r=rrrr�szTitledHelpFormatter.__init__cCsd|jtd��|fS)Nz%s  %s
ZUsage)rOr')rrLrrrrM�sz TitledHelpFormatter.format_usagecCsd|d|jt|�fS)Nz%s
%s
z=-)r;re)rrNrrrrO�sz"TitledHelpFormatter.format_heading)rr!r"rrMrOrrrrr�scCs�|dd�j�dkr%d}n`|dd�j�dkr`d}|dd�pZd}n%|dd�dkrd}nd}|||�S)	Nr,Z0x�Z0b�0r��
)�lower)�val�type�radixrrr�
_parse_num�s		rcCs
t|t�S)N)rr0)r|rrr�
_parse_int�sr�r0Zinteger�long�floatzfloating-point�complexcCsYt|j\}}y||�SWn1tk
rTttd�|||f��YnXdS)Nzoption %s: invalid %s value: %r)�_builtin_cvtr}r4rr')r%rn�valueZcvtZwhatrrr�
check_builtin�s
r�cCsQ||jkr|Sdjtt|j��}ttd�|||f��dS)Nz, z.option %s: invalid choice: %r (choose from %s))�choicesr*�map�reprrr')r%rnr�r�rrr�check_choice�s	r�ZNOZDEFAULTc@s�eZdZddddddddd	d
ddgZd@ZdAZdBZdCZdDZdEZ	de
de
de
de
deiZdZ
dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�ZeeeeeeegZ
d2d3�ZeZd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Z d>d?�Z!dS)Fr�actionr}r\�default�nargs�constr��callback�
callback_args�callback_kwargsrYrq�store�store_const�
store_true�store_falserf�append_const�count�version�stringr0r�r�r��choiceNcOs]g|_g|_|j|�}|j|�|j|�x|jD]}||�qEWdS)N)rtru�_check_opt_strings�_set_opt_strings�
_set_attrs�
CHECK_METHODS)rri�attrs�checkerrrrr3s		

zOption.__init__cCs)dd�|D�}|s%td��|S)NcSsg|]}|r|�qSrr)rarnrrrrcJs	z-Option._check_opt_strings.<locals>.<listcomp>z+at least one option string must be supplied)�	TypeError)rrirrrr�FszOption._check_opt_stringscCs�x�|D]�}t|�dkr5td||��qt|�dkr�|ddkod|ddksztd||��|jj|�q|dd�dko�|ddks�td||��|jj|�qWdS)	Nr,z>invalid option string %r: must be at least two characters longr�-rzMinvalid short option string %r: must be of the form -x, (x any non-dash char)z--zGinvalid long option string %r: must start with --, followed by non-dash)rer
rtrfru)rrirnrrrr�Os$
 	&	zOption._set_opt_stringscCs�xj|jD]_}||kr:t||||�||=q
|dkrYt||t�q
t||d�q
W|r�t|j��}tddj|�|��dS)Nr�zinvalid keyword arguments: %sz, )�ATTRS�setattrr]�sorted�keysr
r*)rr��attrrrrr�ds
zOption._set_attrscCsG|jdkrd|_n(|j|jkrCtd|j|��dS)Nr�zinvalid action: %r)r��ACTIONSr
)rrrr�
_check_actionwszOption._check_actioncCs�|jdkrH|j|jkr�|jdk	r<d|_q�d|_n�t|jt�ri|jj|_|jdkr�d|_|j|jkr�td|j|��|j|jkr�td|j|��dS)Nr�r�r#zinvalid option type: %rz$must not supply a type for action %r)	r}r��ALWAYS_TYPED_ACTIONSr��
isinstancer�TYPESr
�
TYPED_ACTIONS)rrrr�_check_type}s	zOption._check_typecCs�|jdkrz|jdkr0td|��q�t|jttf�s�tdtt|j��jd�d|��n%|jdk	r�td|j|��dS)Nr�z/must supply a list of choices for type 'choice'z1choices must be a list of strings ('%s' supplied)�'rz#must not supply choices for type %r)r}r�r
r��tuple�listr#�split)rrrr�
_check_choice�s,zOption._check_choicecCs�|j|jkp|jdk	}|jdkr||r||jrh|jddd�jdd�|_n|jdd|_dS)Nrr,r�r'r)r��
STORE_ACTIONSr}r\rur_rt)rrrrrr�_check_dest�s	)zOption._check_destcCs;|j|jkr7|jdk	r7td|j|��dS)Nz*'const' must not be supplied for action %r)r��
CONST_ACTIONSr�r
)rrrr�_check_const�s!
zOption._check_constcCsV|j|jkr-|jdkrRd|_n%|jdk	rRtd|j|��dS)Nrz*'nargs' must not be supplied for action %r)r�r�r�r
)rrrr�_check_nargs�s
zOption._check_nargscCs|jdkr�t|j�s4td|j|��|jdk	rlt|jt�rltd|j|��|jdk	rt|jt�rtd|j|��na|jdk	r�td|j|��|jdk	r�td|��|jdk	rtd|��dS)Nr�zcallback not callable: %rz3callback_args, if supplied, must be a tuple: not %rz4callback_kwargs, if supplied, must be a dict: not %rz.callback supplied (%r) for non-callback optionz.callback_args supplied for non-callback optionz0callback_kwargs supplied for non-callback option)	r��callabler�r
r�r�r�r��dict)rrrr�_check_callback�s0zOption._check_callbackcCsdj|j|j�S)N�/)r*rtru)rrrrr �szOption.__str__cCs
|jdk	S)N)r})rrrrrr�szOption.takes_valuecCs#|jr|jdS|jdSdS)Nr)rurt)rrrr�get_opt_string�s	zOption.get_opt_stringcCs9|jj|j�}|dkr%|S||||�SdS)N)�TYPE_CHECKERr[r})rrnr�r�rrr�check_value�szOption.check_valuecsO|dk	rK�jdkr+�j�|�St��fdd�|D��SdS)Nrcs"g|]}�j�|��qSr)r�)ra�v)rnrrrrcs	z(Option.convert_value.<locals>.<listcomp>)r�r�r�)rrnr�r)rnrr�
convert_value�szOption.convert_valuecCs4|j||�}|j|j|j||||�S)N)r��take_actionr�r\)rrnr��valuesr.rrr�processszOption.processc	Cs�|dkrt|||�n�|dkrAt|||j�nb|dkr`t||d�nC|dkrt||d�n$|dkr�|j|g�j|�n�|dkr�|j|g�j|j�n�|d	krt|||j|d
�d�n�|dkrJ|jpf}|jp(i}|j||||||�nY|d
krm|j�|j�n6|dkr�|j	�|j�nt
d|j��dS)Nr�r�r�Tr�Frfr�r�rrr�rYr�zunknown action %r)r�r��ensure_valuerfr�r�r��
print_help�exit�
print_versionr4r�)	rr�r\rnr�r�r.�args�kwargsrrrr�s4#



zOption.take_action)
�store�store_const�
store_true�store_false�append�append_const�count�callbackzhelpzversion)r�r�r�r�r�r�r�)r�r�r�)r�r�)r�r�)zstringzintr�zfloatzcomplexzchoice)"rr!r"r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r r�__repr__rrr�r�r�r�r�rrrrr�s�		
			ZSUPPRESSZHELPZUSAGEc@s�eZdZddd�Zdd�ZeZdd�Zdd	�Zd
d�Z	dd
�Z
ddd�Zddd�Zdd�Z
dS)rNcCs7|r3x*|j�D]\}}t|||�qWdS)N)�itemsr�)rrZr�r|rrrr8szValues.__init__cCs
t|j�S)N)r#�__dict__)rrrrr =szValues.__str__cCsCt|t�r|j|jkSt|t�r;|j|kStSdS)N)r�rr�r��NotImplemented)r�otherrrr�__eq__Bs

z
Values.__eq__cCsMxFt|�D]8}||kr
||}|dk	r
t|||�q
WdS)N)�dirr�)rr�r�Zdvalrrr�_update_carefulJs

zValues._update_carefulcCs|jj|�dS)N)r��update)rr�rrr�
_update_looseWszValues._update_loosecCsL|dkr|j|�n,|dkr8|j|�ntd|��dS)N�carefulZloosezinvalid update mode: %r)r�r�r4)rr��moderrr�_update_s
zValues._updater�cCs1t|�tj|}|jt|�|�dS)N)�
__import__�sys�modulesr��vars)r�modnamer��modrrr�read_modulegs

zValues.read_modulecCs3i}tt|�j�|�|j||�dS)N)�exec�open�readr�)r�filenamer�r�rrr�	read_filelszValues.read_filecCsBt||�s%t||�dkr5t|||�t||�S)N)�hasattr�getattrr�)rr�r�rrrr�qs%zValues.ensure_value)rr!r"rr rr�r�r�r�r�r�r�r�rrrrr6s
c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!S)"rcCs1|j�||_|j|�|j|�dS)N)�_create_option_list�option_class�set_conflict_handler�set_description)rr��conflict_handlerrUrrrr�s
	
zOptionContainer.__init__cCsi|_i|_i|_dS)N)�
_short_opt�	_long_optrZ)rrrr�_create_option_mappings�s		z'OptionContainer._create_option_mappingscCs(|j|_|j|_|j|_dS)N)r�r�rZ)rr.rrr�_share_option_mappings�sz&OptionContainer._share_option_mappingscCs)|dkrtd|��||_dS)N�error�resolvez$invalid conflict_resolution value %r)zerrorr�)r4r�)r�handlerrrrr��sz$OptionContainer.set_conflict_handlercCs
||_dS)N)rU)rrUrrrr��szOptionContainer.set_descriptioncCs|jS)N)rU)rrrr�get_description�szOptionContainer.get_descriptioncCs|`|`|`dS)N)r�r�rZ)rrrr�destroy�szOptionContainer.destroycCsYg}x:|jD]/}||jkr|j||j|f�qWx:|jD]/}||jkrM|j||j|f�qMW|rU|j}|dkr�tddjdd�|D��|��n�|dkrUx|D]w\}}|jd�r|jj	|�|j|=n|jj	|�|j|=|jp;|js�|j
jj	|�q�WdS)Nr�z conflicting option string(s): %sz, cSsg|]}|d�qS)rr)ra�corrrrc�s	z3OptionContainer._check_conflict.<locals>.<listcomp>r�z--)rtr�rfrur�r�rr*�
startswith�remove�	containerrk)rr%Z
conflict_optsrnr�Zc_optionrrr�_check_conflict�s.	

zOptionContainer._check_conflictcOs;t|dt�r(|j||�}nQt|�dkrm|rm|d}t|t�sytd|��ntd��|j|�|jj|�||_	x|j
D]}||j|<q�Wx|jD]}||j
|<q�W|jdk	r7|jtk	r|j|j|j<n"|j|jkr7d|j|j<|S)Nrrznot an Option instance: %rzinvalid arguments)r�r#r�rerr�rrkrfr�rtr�rur�r\r�r]rZ)rr�r�r%rnrrr�
add_option�s(

	zOptionContainer.add_optioncCs"x|D]}|j|�qWdS)N)r)rrkr%rrr�add_optionss
zOptionContainer.add_optionscCs"|jj|�p!|jj|�S)N)r�r[r�)rr&rrr�
get_optionszOptionContainer.get_optioncCs||jkp||jkS)N)r�r�)rr&rrr�
has_option
szOptionContainer.has_optioncCs�|jj|�}|dkr0|jj|�}|dkrLtd|��x|jD]}|j|=qVWx|jD]}|j|=qtW|jjj|�dS)Nzno such option %r)	r�r[r�r4rtrur�rkr�)rr&r%rnrrr�
remove_optionszOptionContainer.remove_optioncCsY|js
dSg}x6|jD]+}|jtk	r|j|j|��qWdj|�S)NrC)rkrYrrfrjr*)r�	formatterrhr%rrr�format_option_helps	z"OptionContainer.format_option_helpcCs|j|j��S)N)rVr�)rrrrrrV'sz"OptionContainer.format_descriptioncCsQg}|jr%|j|j|��|jrD|j|j|��dj|�S)NrT)rUrfrVrkrr*)rrrhrrr�format_help*s		zOptionContainer.format_helpN)rr!r"rr�r�r�r�r�r�rrrrrrrrVrrrrrrws  			c@sOeZdZddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)rNcCs2||_tj||j|j|�||_dS)N)r.rrr�r��title)rr.r	rUrrrr5s	zOptionGroup.__init__cCsg|_|j|j�dS)N)rkr�r.)rrrrr�;s	zOptionGroup._create_option_listcCs
||_dS)N)r	)rr	rrr�	set_title?szOptionGroup.set_titlecCstj|�|`dS)N)rr�rk)rrrrr�Bs
zOptionGroup.destroycCs@|j|j�}|j�|tj||�7}|j�|S)N)rOr	rIrrrJ)rrrhrrrrIs


zOptionGroup.format_help)rr!r"rr�r
r�rrrrrr3s
c@seZdZgZddeddddddddd�
Zdd�Zdd	�Zd
d�Zdd
�Z	ddd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zddd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:dd;d<�Z d=d>�Z!d?d@�Z"ddAdB�Z#dCdD�Z$ddEdF�Z%ddGdH�Z&dIdJ�Z'ddKdL�Z(ddMdN�Z)dS)OrNr�TcCs�tj||||�|j|�|	|_||_d|_d|_|dkr\t�}||_|jj	|�|
|_
|j|d|�|j�dS)NT�add_help)
rr�	set_usage�progr��allow_interspersed_args�process_default_valuesr
rrBrW�_populate_option_list�_init_parsing_state)rrLrkr�r�r�rUrZadd_help_optionr
rWrrrr�s
							zOptionParser.__init__cCsAtj|�x|jD]}|j�qW|`|`|`dS)N)rr�rmrkr)rrorrrr��s
zOptionParser.destroycCs g|_g|_|j�dS)N)rkrmr�)rrrrr��s		z OptionParser._create_option_listcCs&|jdddddtd��dS)Nz-hz--helpr�rYzshow this help message and exit)rr')rrrr�_add_help_option�szOptionParser._add_help_optioncCs#|jddddtd��dS)Nz	--versionr�r�rYz&show program's version number and exit)rr')rrrr�_add_version_option�sz OptionParser._add_version_optioncCsS|jr|j|j�|r,|j|�|jr?|j�|rO|j�dS)N)�standard_option_listrr�rr)rrkrrrrr�s	
	
z"OptionParser._populate_option_listcCsd|_d|_d|_dS)N)�rargs�largsr�)rrrrr�s		z OptionParser._init_parsing_statecCsn|dkrtd�|_nL|tkr6d|_n4|j�jd�ra|dd�|_n	||_dS)Nz%prog [options]zusage: �)r'rLrr{r�)rrLrrrr�szOptionParser.set_usagecCs
d|_dS)NT)r)rrrr�enable_interspersed_args�sz%OptionParser.enable_interspersed_argscCs
d|_dS)NF)r)rrrr�disable_interspersed_argssz&OptionParser.disable_interspersed_argscCs
||_dS)N)r)rr�rrr�set_process_default_values
sz'OptionParser.set_process_default_valuescCs||j|<dS)N)rZ)rr\r�rrr�set_default
szOptionParser.set_defaultcKs|jj|�dS)N)rZr�)rr�rrr�set_defaultsszOptionParser.set_defaultscCs;|jdd�}x!|jD]}|j|j�qW|S)N)rkrmrg)rZoptionsrorrr�_get_all_optionsszOptionParser._get_all_optionscCs�|jst|j�S|jj�}xZ|j�D]L}|j|j�}t|t�r2|j	�}|j
||�||j<q2Wt|�S)N)rrrZ�copyrr[r\r�r#r�r�)rrZr%r�r&rrr�get_default_valuess	
zOptionParser.get_default_valuescOs�t|dt�r(t|||�}nlt|�dkr�|r�|d}t|t�sjtd|��|j|k	r�td��ntd��|jj|�|S)Nrrznot an OptionGroup instance: %rz"invalid OptionGroup (wrong parser)zinvalid arguments)	r�r#rrer�r.r4rmrf)rr�r�rorrr�add_option_group*s
zOptionParser.add_option_groupcCsD|jj|�p!|jj|�}|r@|j|k	r@|jSdS)N)r�r[r�r�)rr&r%rrr�get_option_group:s
zOptionParser.get_option_groupcCs/|dkrtjdd�S|dd�SdS)Nr)r��argv)rr�rrr�	_get_argsDszOptionParser._get_argscCs�|j|�}|dkr'|j�}||_g|_}||_y|j|||�}Wn>ttfk
r�}z|jt	|��WYdd}~XnX||}|j
||�S)N)r#rrrr��
_process_argsrrr�r#�check_values)rr�r�rr�stop�errrrr�
parse_argsJs	
	&
zOptionParser.parse_argscCs
||fS)Nr)rr�r�rrrr%qszOptionParser.check_valuescCs�x�|r�|d}|dkr*|d=dS|dd�dkrS|j||�q|dd�dkr�t|�dkr�|j||�q|jr�|j|�|d=qdSqWdS)Nrz--r,rr�)�_process_long_optre�_process_short_optsrrf)rrrr��argrrrr$~s
	
(	

zOptionParser._process_argscCst||j�S)N)�
_match_abbrevr�)rrnrrr�_match_long_opt�szOptionParser._match_long_optc
CsK|jd�}d|krL|jdd�\}}|jd|�d}n|}d}|j|�}|j|}|j�r|j}t|�|kr�|jt	dd|�d|d	|i�q1|dkr�|jd�}	q1t
|d|��}	|d|�=n&|r+|jtd
�|�nd}	|j||	||�dS)NrrGrTFz.%(option)s option requires %(number)d argumentz/%(option)s option requires %(number)d argumentsr%�numberz%s option does not take a value)
�popr��insertr-r�rrr�rer�rr�r'r�)
rrr�r+rnZnext_argZhad_explicit_valuer%r�r�rrrr)�s0	
		zOptionParser._process_long_optcCs^|jd�}d}d}x<|dd�D]*}d|}|jj|�}|d7}|sjt|��|j�r3|t|�kr�|jd||d��d}|j}	t|�|	kr�|jt	dd|	�d|d	|	i�q9|	dkr
|jd�}
q9t
|d|	��}
|d|	�=nd}
|j||
||�|r,Pq,WdS)
NrFrr�Tz.%(option)s option requires %(number)d argumentz/%(option)s option requires %(number)d argumentsr%r.)r/r�r[rrrrer0r�r�rr�r�)rrr�r+r&�iZchrnr%r�r�rrrr*�s6

		z OptionParser._process_short_optscCs1|jdkr&tjjtjd�S|jSdS)Nr)r
r1�path�basenamer�r")rrrr�
get_prog_nameszOptionParser.get_prog_namecCs|jd|j��S)Nz%prog)r_r4)r�srrr�expand_prog_name
szOptionParser.expand_prog_namecCs|j|j�S)N)r6rU)rrrrr�szOptionParser.get_descriptionrcCs'|rtjj|�tj|�dS)N)r��stderr�writer�)rZstatusrrrrr�szOptionParser.exitcCs4|jtj�|jdd|j�|f�dS)Nr,z%s: error: %s
)�print_usager�r7r�r4)rrrrrr�szOptionParser.errorcCs-|jr%|jj|j|j��SdSdS)NrC)rLrrMr6)rrrr�	get_usage"s		zOptionParser.get_usagecCs#|jrt|j�d|�dS)N�file)rL�printr:)rr;rrrr9)s		zOptionParser.print_usagecCs!|jr|j|j�SdSdS)NrC)r�r6)rrrr�get_version5s	zOptionParser.get_versioncCs#|jrt|j�d|�dS)Nr;)r�r<r=)rr;rrrr�;s	zOptionParser.print_versioncCs�|dkr|j}|j|�g}|j|jtd���|j�|jr}|jtj||��|jd�x4|j	D])}|j|j
|��|jd�q�W|j�dj|dd��S)NZOptionsrTrCrrd)
rrprfrOr'rIrkrrrmrrJr*)rrrhrorrrrFs	

	

zOptionParser.format_option_helpcCs|j|j�S)N)rXrW)rrrrrrXWszOptionParser.format_epilogcCs�|dkr|j}g}|jr;|j|j�d�|jr^|j|j|�d�|j|j|��|j|j|��dj|�S)NrTrC)	rrLrfr:rUrVrrXr*)rrrhrrrrZs			zOptionParser.format_helpcCs,|dkrtj}|j|j��dS)N)r��stdoutr8r)rr;rrrr�fs	zOptionParser.print_help)*rr!r"rrrr�r�rrrrrrrrrrrrr r!r#r(r%r$r-r)r*r4r6r�r�r�r:r9r=r�rrXrr�rrrrrQs^F
	
'
3	$)
cs{�|kr�S�fdd�|j�D�}t|�dkrI|dS|s^t���n|j�t�|��dS)Ncs%g|]}|j��r|�qSr)r�)raZword)r5rrrcs	z!_match_abbrev.<locals>.<listcomp>rr)r�rer�sortr()r5Zwordmapr)r)r5rr,ss
r,)&�__version__�__all__Z
__copyright__r�r1rQrrr�ImportErrorr'�	Exceptionrr
rrrr(r	r
rrr�r�r�r�r�r�r]rrrrrrrr,rrrrr�<module>sp	 



�
�t

A���$

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.