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



���\`�@sdZddddddddd	d
ddd
ddddgZddlZddlZddlZddlZ	ddl
ZddlZ
ddlmZmZdZdZdZdZdZdZdZGdd�de�Zdd�ZGd d�de�ZGd!d�de�ZGd"d�de�ZGd#d�de�ZGd$d	�d	e�Zd%d&�Z Gd'd�de!�Z"Gd(d�de!�Z#Gd)d�de�Z$Gd*d+�d+e$�Z%Gd,d-�d-e$�Z&Gd.d/�d/e&�Z'Gd0d1�d1e&�Z(Gd2d3�d3e$�Z)Gd4d5�d5e$�Z*Gd6d7�d7e$�Z+Gd8d9�d9e$�Z,Gd:d;�d;e$�Z-Gd<d=�d=e$�Z.Gd>d�de�Z/Gd?d
�d
e�Z0Gd@dA�dAe�Z1GdBdC�dCe1�Z2GdDdE�dEe2�Z3GdFd�dee1�Z4dS)Gz1.1�ArgumentParser�
ArgumentError�ArgumentTypeError�FileType�
HelpFormatter�ArgumentDefaultsHelpFormatter�RawDescriptionHelpFormatter�RawTextHelpFormatter�MetavarTypeHelpFormatter�	Namespace�Action�ONE_OR_MORE�OPTIONAL�PARSER�	REMAINDER�SUPPRESS�ZERO_OR_MORE�N)�gettext�ngettextz==SUPPRESS==�?�*�+zA...z...Z_unrecognized_argsc@s4eZdZdd�Zdd�Zdd�ZdS)�_AttributeHoldercCs�t|�j}g}x'|j�D]}|jt|��q"Wx1|j�D]#\}}|jd||f�qLWd|dj|�fS)Nz%s=%rz%s(%s)z, )�type�__name__�	_get_args�append�repr�_get_kwargs�join)�selfZ	type_name�arg_strings�arg�name�value�r%�8/opt/rh/rh-python35/root/usr/lib64/python3.5/argparse.py�__repr__vsz_AttributeHolder.__repr__cCst|jj��S)N)�sorted�__dict__�items)r r%r%r&rsz_AttributeHolder._get_kwargscCsgS)Nr%)r r%r%r&r�sz_AttributeHolder._get_argsN)r�
__module__�__qualname__r'rrr%r%r%r&rms		rcCs5t||d�dkr(t|||�t||�S)N)�getattr�setattr)�	namespacer#r$r%r%r&�
_ensure_value�sr0c@sjeZdZddddd�Zdd�Zdd	�ZGd
d�de�Zdd
�Zdd�Z	dd�Z
dd�Zddd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�ZdS):r��NcCs�|dkrNyttjd�}Wnttfk
rCd}YnX|d8}||_||_||_t|t	|d|d��|_||_
d|_d|_d|_
|j|d�|_|j|_tjd�|_tjd�|_dS)NZCOLUMNS�Pr1�rz\s+z\n\n\n+)�int�_os�environ�KeyError�
ValueError�_prog�_indent_increment�_max_help_position�min�max�_width�_current_indent�_level�_action_max_length�_Section�
_root_section�_current_section�_re�compile�_whitespace_matcher�_long_break_matcher)r �progZindent_incrementZmax_help_position�widthr%r%r&�__init__�s&
							zHelpFormatter.__init__cCs%|j|j7_|jd7_dS)N�)r@r;rA)r r%r%r&�_indent�szHelpFormatter._indentcCs%|j|j8_|jd8_dS)NrM)r@r;rA)r r%r%r&�_dedent�szHelpFormatter._dedentc@s+eZdZddd�Zdd�ZdS)zHelpFormatter._SectionNcCs(||_||_||_g|_dS)N)�	formatter�parent�headingr*)r rPrQrRr%r%r&rL�s			zHelpFormatter._Section.__init__cCs�|jdk	r|jj�|jj}x!|jD]\}}||�q2W|dd�|jD��}|jdk	r�|jj�|s�dS|jtk	r�|jdk	r�|jj}d|d|jf}nd}|d||dg�S)NcSs"g|]\}}||��qSr%r%)�.0�func�argsr%r%r&�
<listcomp>�s	z6HelpFormatter._Section.format_help.<locals>.<listcomp>�z%*s%s:
�
)	rQrPrN�_join_partsr*rOrRrr@)r rrTrUZ	item_helpZcurrent_indentrRr%r%r&�format_help�s

z"HelpFormatter._Section.format_help)rr+r,rLrZr%r%r%r&rC�srCcCs|jjj||f�dS)N)rEr*r)r rTrUr%r%r&�	_add_item�szHelpFormatter._add_itemcCsB|j�|j||j|�}|j|jg�||_dS)N)rNrCrEr[rZ)r rRZsectionr%r%r&�
start_section�s
zHelpFormatter.start_sectioncCs|jj|_|j�dS)N)rErQrO)r r%r%r&�end_section�szHelpFormatter.end_sectioncCs2|tk	r.|dk	r.|j|j|g�dS)N)rr[�_format_text)r �textr%r%r&�add_text�szHelpFormatter.add_textcCs5|tk	r1||||f}|j|j|�dS)N)rr[�
_format_usage)r �usage�actions�groups�prefixrUr%r%r&�	add_usage�szHelpFormatter.add_usagecCs�|jtk	r�|j}||�g}x*|j|�D]}|j||��q7Wtdd�|D��}||j}t|j|�|_|j|j	|g�dS)NcSsg|]}t|��qSr%)�len)rS�sr%r%r&rVs	z.HelpFormatter.add_argument.<locals>.<listcomp>)
�helpr�_format_action_invocation�_iter_indented_subactionsrr>r@rBr[�_format_action)r �actionZget_invocationZinvocations�	subactionZinvocation_lengthZ
action_lengthr%r%r&�add_argument�s	
	zHelpFormatter.add_argumentcCs"x|D]}|j|�qWdS)N)ro)r rcrmr%r%r&�
add_argumentss
zHelpFormatter.add_argumentscCsA|jj�}|r=|jjd|�}|jd�d}|S)Nz

rX)rDrZrI�sub�strip)r rir%r%r&rZs
zHelpFormatter.format_helpcCsdjdd�|D��S)NrWcSs(g|]}|r|tk	r|�qSr%)r)rS�partr%r%r&rVs	z-HelpFormatter._join_parts.<locals>.<listcomp>)r)r Zpart_stringsr%r%r&rYszHelpFormatter._join_partscs�|dkrtd�}|dk	r=|td|j�}n�|dkri|ridtd|j�}nY|dkr�dtd|j�}g}g}x4|D],}|jr�|j|�q�|j|�q�W|j}	|	|||�}
djdd�||
gD��}|j|j�t	|�t	|��kr�d}|	||�}|	||�}
t
j||�}t
j||
�}d�fdd	�}t	|�t	|�d
�kr9dt	|�t	|�d}|r||g|||�}|j|||��q�|r-||g|||�}q�|g}nzdt	|�}||}|||�}t	|�dkr�g}|j|||��|j|||��|g|}dj|�}d
||fS)Nzusage: rJz%(prog)s� cSsg|]}|r|�qSr%r%)rSrhr%r%r&rV=s	z/HelpFormatter._format_usage.<locals>.<listcomp>z\(.*?\)+|\[.*?\]+|\S+csg}g}|dk	r+t|�d}nt|�d}x|D]w}|dt|��kr�|r�|j|dj|��g}t|�d}|j|�|t|�d7}qBW|r�|j|dj|��|dk	r|dt|�d�|d<|S)NrMrtr)rgrr)�parts�indentre�lines�lineZline_lenrs)�
text_widthr%r&�	get_linesMs"
 
z.HelpFormatter._format_usage.<locals>.get_linesg�?rMrXz%s%s

)
�_�dictr:�option_stringsr�_format_actions_usagerr?r@rgrF�findall�extend)r rbrcrdrerJZ	optionals�positionalsrm�formatZaction_usageZpart_regexpZ	opt_usageZ	pos_usageZ	opt_partsZ	pos_partsrzrvrwrur%)ryr&ra!sV
		" 

zHelpFormatter._format_usagec
Cs�t�}i}x#|D]}y|j|jd�}Wntk
rMwYqX|t|j�}|||�|jkrx|jD]}|j|�q�W|js�||kr�||d7<n
d||<d||<n1||kr�||d7<n
d||<d||<x%t|d|�D]}	d	||	<qWqWg}
x�t|�D]w\}	}|j	t
kr�|
jd�|j|	�d	kr�|j
|	�q�|j|	d�d	kr�|j
|	d�qH|js8|j|�}|j||�}||kr(|ddkr(|ddkr(|dd�}|
j|�qH|jd}
|jdkrad
|
}n1|j|�}|j||�}d|
|f}|jr�||kr�d|}|
j|�qHWx1t|d
d�D]}	||	g|
|	|	�<q�Wdjdd�|
D��}d}d}tjd|d|�}tjd|d|�}tjd||fd|�}tjdd|�}|j�}|S)Nrz [�[�]z (�(�)rM�|z%sz%s %sz[%s]�reverseTrtcSs"g|]}|dk	r|�qS)Nr%)rS�itemr%r%r&rV�s	z7HelpFormatter._format_actions_usage.<locals>.<listcomp>z[\[(]z[\])]z(%s) z\1z (%s)z%s *%srWz\(([^|]*)\)���r�)�set�index�_group_actionsr9rg�add�required�range�	enumeraterirr�get�popr}�#_get_default_metavar_for_positional�_format_args�nargs�!_get_default_metavar_for_optionalr(rrFrqrr)r rcrd�
group_actionsZinserts�group�start�endrm�iru�defaultrs�
option_string�args_stringr_�open�closer%r%r&r~}sr	

	




	 


z#HelpFormatter._format_actions_usagecCs_d|kr"|td|j�}t|j|jd�}d|j}|j|||�dS)Nz%(prog)rJ�rtz

)r|r:r>r?r@�
_fill_text)r r_ryrvr%r%r&r^�s

zHelpFormatter._format_textc
Cs�t|jd|j�}t|j|d�}||jd}|j|�}|jsw|jd|f}d|}n\t|�|kr�|jd||f}d|}d}n"|jd|f}d|}|}|g}|jr\|j	|�}	|j
|	|�}
|jd|d|
df�xQ|
dd�D] }|jd|d|f�q5Wn|jd�sx|jd�x-|j
|�D]}|j|j|��q�W|j|�S)	Nr1r�rWz%*s%s
z	%*s%-*s  rrMrX)r=rBr<r>r?r@rjrirg�_expand_help�_split_linesr�endswithrkrlrY)
r rmZ
help_positionZ
help_widthZaction_widthZ
action_header�tupZindent_firstruZ	help_textZ
help_linesrxrnr%r%r&rl�s6
	

	
		!
zHelpFormatter._format_actioncCs�|js7|j|�}|j||�d�\}|Sg}|jdkr_|j|j�nL|j|�}|j||�}x(|jD]}|jd||f�q�Wdj|�SdS)NrMrz%s %sz, )	r}r��_metavar_formatterr�r�r�r�rr)r rmr��metavarrur�r�r%r%r&rjs	z'HelpFormatter._format_action_invocationcsr|jdk	r|j�nA|jdk	rVdd�|jD�}ddj|��n|��fdd�}|S)NcSsg|]}t|��qSr%)�str)rSZchoicer%r%r&rV0s	z4HelpFormatter._metavar_formatter.<locals>.<listcomp>z{%s}�,cs"t�t�r�S�f|SdS)N)�
isinstance�tuple)Z
tuple_size)�resultr%r&r�5sz0HelpFormatter._metavar_formatter.<locals>.format)r��choicesr)r rm�default_metavarZchoice_strsr�r%)r�r&r�,sz HelpFormatter._metavar_formattercCs|j||�}|jdkr4d|d�}n�|jtkrVd|d�}n�|jtkrxd|d�}n�|jtkr�d|d�}nr|jtkr�d}nZ|jtkr�d|d�}n8d	d
�t|j�D�}dj|�||j�}|S)Nz%srMz[%s]z
[%s [%s ...]]r1z%s [%s ...]z...z%s ...cSsg|]}d�qS)z%sr%)rSr{r%r%r&rVKs	z.HelpFormatter._format_args.<locals>.<listcomp>rt)	r�r�r
rrrrr�r)r rmr�Zget_metavarr�Zformatsr%r%r&r�<s 	zHelpFormatter._format_argscCs�tt|�d|j�}x+t|�D]}||tkr(||=q(Wx8t|�D]*}t||d�rV||j||<qVW|jd�dk	r�djdd�|dD��}||d<|j	|�|S)NrJrr�z, cSsg|]}t|��qSr%)r�)rS�cr%r%r&rVXs	z.HelpFormatter._expand_help.<locals>.<listcomp>)
r|�varsr:�listr�hasattrrr�r�_get_help_string)r rmZparamsr#Zchoices_strr%r%r&r�Os 
zHelpFormatter._expand_helpccsFy
|j}Wntk
r!Yn!X|j�|�EdH|j�dS)N)�_get_subactions�AttributeErrorrNrO)r rmZget_subactionsr%r%r&rk\s


z'HelpFormatter._iter_indented_subactionscCs+|jjd|�j�}tj||�S)Nrt)rHrqrr�	_textwrapZwrap)r r_rKr%r%r&r�fszHelpFormatter._split_linescCs7|jjd|�j�}tj||d|d|�S)NrtZinitial_indentZsubsequent_indent)rHrqrrr�Zfill)r r_rKrvr%r%r&r�jszHelpFormatter._fill_textcCs|jS)N)ri)r rmr%r%r&r�oszHelpFormatter._get_help_stringcCs
|jj�S)N)�dest�upper)r rmr%r%r&r�rsz/HelpFormatter._get_default_metavar_for_optionalcCs|jS)N)r�)r rmr%r%r&r�usz1HelpFormatter._get_default_metavar_for_positional)rr+r,rLrNrO�objectrCr[r\r]r`rfrorprZrYrar~r^rlrjr�r�r�rkr�r�r�r�r�r%r%r%r&r�s:	!\a/

c@seZdZdd�ZdS)rcs,dj�fdd�|jdd�D��S)NrWc3s|]}�|VqdS)Nr%)rSrx)rvr%r&�	<genexpr>�sz9RawDescriptionHelpFormatter._fill_text.<locals>.<genexpr>�keependsT)r�
splitlines)r r_rKrvr%)rvr&r��sz&RawDescriptionHelpFormatter._fill_textN)rr+r,r�r%r%r%r&rysc@seZdZdd�ZdS)rcCs
|j�S)N)r�)r r_rKr%r%r&r��sz!RawTextHelpFormatter._split_linesN)rr+r,r�r%r%r%r&r�sc@seZdZdd�ZdS)rcCsY|j}d|jkrU|jtk	rUttg}|jsK|j|krU|d7}|S)Nz
%(default)z (default: %(default)s))rir�rr
rr}r�)r rmriZdefaulting_nargsr%r%r&r��s	
z.ArgumentDefaultsHelpFormatter._get_help_stringN)rr+r,r�r%r%r%r&r�sc@s(eZdZdd�Zdd�ZdS)r	cCs
|jjS)N)rr)r rmr%r%r&r��sz:MetavarTypeHelpFormatter._get_default_metavar_for_optionalcCs
|jjS)N)rr)r rmr%r%r&r��sz<MetavarTypeHelpFormatter._get_default_metavar_for_positionalN)rr+r,r�r�r%r%r%r&r	�scCsi|dkrdS|jr)dj|j�S|jdtfkrE|jS|jdtfkra|jSdSdS)N�/)r}rr�rr�)�argumentr%r%r&�_get_action_name�s	r�c@s(eZdZdd�Zdd�ZdS)rcCst|�|_||_dS)N)r��
argument_name�message)r r�r�r%r%r&rL�szArgumentError.__init__cCs;|jdkrd}nd}|td|jd|j�S)Nz%(message)sz'argument %(argument_name)s: %(message)sr�r�)r�r|r�)r r�r%r%r&�__str__�s
	zArgumentError.__str__N)rr+r,rLr�r%r%r%r&r�sc@seZdZdS)rN)rr+r,r%r%r%r&r�sc
@sOeZdZdddddddddd�Zdd�Zddd�ZdS)	rNFcCs^||_||_||_||_||_||_||_||_|	|_|
|_	dS)N)
r}r�r��constr�rr�r�rir�)r r}r�r�r�r�rr�r�rir�r%r%r&rLs									zAction.__init__c	s8ddddddddd	g	}�fd
d�|D�S)Nr}r�r�r�r�rr�rir�cs%g|]}|t�|�f�qSr%)r-)rSr#)r r%r&rV3s	z&Action._get_kwargs.<locals>.<listcomp>r%)r �namesr%)r r&r's	zAction._get_kwargscCsttd���dS)Nz.__call__() not defined)�NotImplementedErrorr{)r �parserr/�valuesr�r%r%r&�__call__5szAction.__call__)rr+r,rLrr�r%r%r%r&r�s6csIeZdZdddddddd�fdd�Zddd�Z�S)�_StoreActionNFcs�|dkrtd��|dk	r@|tkr@tdt��tt|�jd|d|d|d|d|d	|d
|d|d|	d
|
�
dS)Nrz�nargs for store actions must be > 0; if you have nothing to store, actions such as store true or store const may be more appropriatez nargs must be %r to supply constr}r�r�r�r�rr�r�rir�)r9r
�superr�rL)r r}r�r�r�r�rr�r�rir�)�	__class__r%r&rL;sz_StoreAction.__init__cCst||j|�dS)N)r.r�)r r�r/r�r�r%r%r&r�Xsz_StoreAction.__call__)rr+r,rLr�r%r%)r�r&r�9sr�cs=eZdZdddd�fdd�Zddd�Z�S)�_StoreConstActionNFcsAtt|�jd|d|ddd|d|d|d|�dS)	Nr}r�r�rr�r�r�ri)r�r�rL)r r}r�r�r�r�rir�)r�r%r&rL^sz_StoreConstAction.__init__cCst||j|j�dS)N)r.r�r�)r r�r/r�r�r%r%r&r�osz_StoreConstAction.__call__)rr+r,rLr�r%r%)r�r&r�\s

r�cs+eZdZddd�fdd�Z�S)�_StoreTrueActionFNc
s;tt|�jd|d|ddd|d|d|�dS)Nr}r�r�Tr�r�ri)r�r�rL)r r}r�r�r�ri)r�r%r&rLusz_StoreTrueAction.__init__)rr+r,rLr%r%)r�r&r�ssr�cs+eZdZddd�fdd�Z�S)�_StoreFalseActionTFNc
s;tt|�jd|d|ddd|d|d|�dS)Nr}r�r�Fr�r�ri)r�r�rL)r r}r�r�r�ri)r�r%r&rL�sz_StoreFalseAction.__init__)rr+r,rLr%r%)r�r&r��sr�csIeZdZdddddddd�fdd�Zddd�Z�S)�
_AppendActionNFcs�|dkrtd��|dk	r@|tkr@tdt��tt|�jd|d|d|d|d|d	|d
|d|d|	d
|
�
dS)Nrz�nargs for append actions must be > 0; if arg strings are not supplying the value to append, the append const action may be more appropriatez nargs must be %r to supply constr}r�r�r�r�rr�r�rir�)r9r
r�r�rL)r r}r�r�r�r�rr�r�rir�)r�r%r&rL�sz_AppendAction.__init__cCsBtjt||jg��}|j|�t||j|�dS)N)�_copy�copyr0r�rr.)r r�r/r�r�r*r%r%r&r��s
z_AppendAction.__call__)rr+r,rLr�r%r%)r�r&r��sr�cs=eZdZdddd�fdd�Zddd�Z�S)�_AppendConstActionNFcsGtt|�jd|d|ddd|d|d|d|d	|�dS)
Nr}r�r�rr�r�r�rir�)r�r�rL)r r}r�r�r�r�rir�)r�r%r&rL�sz_AppendConstAction.__init__cCsEtjt||jg��}|j|j�t||j|�dS)N)r�r�r0r�rr�r.)r r�r/r�r�r*r%r%r&r��sz_AppendConstAction.__call__)rr+r,rLr�r%r%)r�r&r��s
r�cs:eZdZddd�fdd�Zddd�Z�S)�_CountActionNFc
s;tt|�jd|d|ddd|d|d|�dS)Nr}r�r�rr�r�ri)r�r�rL)r r}r�r�r�ri)r�r%r&rL�sz_CountAction.__init__cCs0t||jd�d}t||j|�dS)NrrM)r0r�r.)r r�r/r�r�Z	new_countr%r%r&r��sz_CountAction.__call__)rr+r,rLr�r%r%)r�r&r��s	r�cs:eZdZeed�fdd�Zddd�Z�S)�_HelpActionNcs5tt|�jd|d|d|ddd|�dS)Nr}r�r�r�rri)r�r�rL)r r}r�r�ri)r�r%r&rL�sz_HelpAction.__init__cCs|j�|j�dS)N)�
print_help�exit)r r�r/r�r�r%r%r&r��s
z_HelpAction.__call__)rr+r,rrLr�r%r%)r�r&r��sr�cs=eZdZdeed�fdd�Zddd�Z�S)�_VersionActionNz&show program's version number and exitcs>tt|�jd|d|d|ddd|�||_dS)Nr}r�r�r�rri)r�r�rL�version)r r}r�r�r�ri)r�r%r&rL�sz_VersionAction.__init__cCs^|j}|dkr|j}|j�}|j|�|j|j�tj�|j�dS)N)r��_get_formatterr`�_print_messagerZ�_sys�stdoutr�)r r�r/r�r�r�rPr%r%r&r�s		
z_VersionAction.__call__)rr+r,rrLr�r%r%)r�r&r��s
	r�csheZdZGdd�de�Zedd�fdd�Zdd�Zdd	�Zdd
d�Z	�S)�_SubParsersActioncs"eZdZ�fdd�Z�S)z&_SubParsersAction._ChoicesPseudoActionc	s_|}}|r'|ddj|�7}ttj|�}|jdgd|d|d|�dS)Nz (%s)z, r}r�rir�)rr�r��_ChoicesPseudoActionrL)r r#�aliasesrir�r�Zsup)r�r%r&rLs
z/_SubParsersAction._ChoicesPseudoAction.__init__)rr+r,rLr%r%)r�r&r�sr�Nc
sh||_||_tj�|_g|_tt|�jd|d|dt	d|jd|d|�dS)Nr}r�r�r�rir�)
�_prog_prefix�
_parser_class�_collections�OrderedDict�_name_parser_map�_choices_actionsr�r�rLr)r r}rJ�parser_classr�rir�)r�r%r&rL"s				z_SubParsersAction.__init__cKs�|jd�dkr,d|j|f|d<|jdf�}d|kr~|jd�}|j|||�}|jj|�|j|�}||j|<x|D]}||j|<q�W|S)NrJz%s %sr�ri)r�r�r�r�r�rr�r�)r r#�kwargsr�riZ
choice_actionr��aliasr%r%r&�
add_parser7s

z_SubParsersAction.add_parsercCs|jS)N)r�)r r%r%r&r�Nsz!_SubParsersAction._get_subactionsc
Cs |d}|dd�}|jtk	r<t||j|�y|j|}WnOtk
r�d|ddj|j�i}td�|}t||��YnX|j|d�\}	}x0t	|	�j
�D]\}
}t||
|�q�W|rt	|�jtg�t
|t�j|�dS)NrrM�parser_namer�z, z5unknown parser %(parser_name)r (choices: %(choices)s))r�rr.r�r8rr{r�parse_known_argsr�r*�
setdefault�_UNRECOGNIZED_ARGS_ATTRr-r�)r r�r/r�r�r�r!rU�msgZsubnamespace�keyr$r%r%r&r�Qs"

	z_SubParsersAction.__call__)
rr+r,rr�rrLr�r�r�r%r%)r�r&r�sr�c@s@eZdZdd
dddd�Zdd�Zdd	�ZdS)r�rrMNcCs(||_||_||_||_dS)N)�_mode�_bufsize�	_encoding�_errors)r �mode�bufsize�encoding�errorsr%r%r&rL�s			zFileType.__init__cCs�|dkrWd|jkr"tjSd|jkr8tjStd�|j}t|��y&t||j|j|j|j	�SWnGt
k
r�}z'td�}t|||f��WYdd}~XnXdS)N�-r��wzargument "-" with mode %rzcan't open '%s': %s)r�r��stdinr�r{r9r�r�r�r��OSErrorr)r �stringr��er�r%r%r&r��szFileType.__call__cCst|j|jf}d|jfd|jfg}djdd�|D�dd�|D��}dt|�j|fS)Nr�r�z, cSs(g|]}|dkrt|��qS)rMr�)r)rSr"r%r%r&rV�s	z%FileType.__repr__.<locals>.<listcomp>cSs2g|](\}}|dk	rd||f�qS)Nz%s=%rr%)rS�kwr"r%r%r&rV�s		z%s(%s))r�r�r�r�rrr)r rUr�Zargs_strr%r%r&r'�s
zFileType.__repr__r�)rr+r,rLr�r'r%r%r%r&rvsc@s4eZdZdd�Zdd�Zdd�ZdS)r
cKs)x"|D]}t||||�qWdS)N)r.)r r�r#r%r%r&rL�s
zNamespace.__init__cCs)t|t�stSt|�t|�kS)N)r�r
�NotImplementedr�)r �otherr%r%r&�__eq__�szNamespace.__eq__cCs
||jkS)N)r))r r�r%r%r&�__contains__�szNamespace.__contains__N)rr+r,rLrrr%r%r%r&r
�scs�eZdZ�fdd�Zdd�Zddd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zddd�Zdd�Zd d!�Zd"d#�Zd$d%�Z�S)&�_ActionsContainercsgtt|�j�||_||_||_||_i|_|jddt	�|jddt	�|jddt
�|jddt�|jddt�|jddt
�|jddt�|jddt�|jdd	t�|jdd
t�|jddt�|j�g|_i|_g|_g|_i|_tjd�|_g|_dS)
NrmZstoreZstore_const�
store_trueZstore_falserZappend_const�countrir��parsersz^-\d+$|^-\d*\.\d+$)r�rrL�description�argument_default�prefix_chars�conflict_handler�_registries�registerr�r�r�r�r�r�r�r�r�r��_get_handler�_actions�_option_string_actions�_action_groups�_mutually_exclusive_groups�	_defaultsrFrG�_negative_number_matcher�_has_negative_number_optionals)r r
rrr
)r�r%r&rL�s2					
					z_ActionsContainer.__init__cCs#|jj|i�}|||<dS)N)rr�)r �
registry_namer$r��registryr%r%r&r�sz_ActionsContainer.registerNcCs|j|j||�S)N)rr�)r rr$r�r%r%r&�
_registry_get�sz_ActionsContainer._registry_getcKsG|jj|�x0|jD]%}|j|kr||j|_qWdS)N)r�updaterr�r�)r r�rmr%r%r&�set_defaultssz_ActionsContainer.set_defaultscCsLx6|jD]+}|j|kr
|jdk	r
|jSq
W|jj|d�S)N)rr�r�rr�)r r�rmr%r%r&�get_default	sz_ActionsContainer.get_defaultcOs�|j}|s6t|�dkri|dd|kri|rTd|krTtd��|j||�}n|j||�}d|kr�|d}||jkr�|j||d<n|jdk	r�|j|d<|j|�}t|�s�td|f��||�}|j	d|j
|j
�}t|�sDtd|f��t|d	�r�y|j�j
|d�Wntk
r�td
��YnX|j|�S)NrMrr�z+dest supplied twice for positional argumentr�zunknown action "%s"rz%r is not callabler�z,length of metavar tuple does not match nargs)rrgr9�_get_positional_kwargs�_get_optional_kwargsrr�_pop_action_class�callablerrr�r�r��	TypeError�_add_action)r rUr��charsr�Zaction_classrm�	type_funcr%r%r&ros2		-


z_ActionsContainer.add_argumentcOs&t|||�}|jj|�|S)N)�_ArgumentGrouprr)r rUr�r�r%r%r&�add_argument_groupBsz$_ActionsContainer.add_argument_groupcKs#t||�}|jj|�|S)N)�_MutuallyExclusiveGrouprr)r r�r�r%r%r&�add_mutually_exclusive_groupGsz._ActionsContainer.add_mutually_exclusive_groupcCs�|j|�|jj|�||_x|jD]}||j|<q0Wx<|jD]1}|jj|�rQ|jsQ|jjd�qQW|S)NT)	�_check_conflictrr�	containerr}rr�matchr)r rmr�r%r%r&r#Ls
		z_ActionsContainer._add_actioncCs|jj|�dS)N)r�remove)r rmr%r%r&�_remove_actionasz _ActionsContainer._remove_actioncCsIi}xL|jD]A}|j|krDtd�}t||j��|||j<qWi}xs|jD]h}|j|kr�|jd|jd|jd|j�||j<x"|jD]}||j||<q�WqeWxD|jD]9}|j	d|j
�}x|jD]}|||<qWq�Wx*|jD]}|j||�j
|�q"WdS)Nz.cannot merge actions - two groups are named %r�titler
r
r�)rr/r{r9r'r
r
r�rr)r�rr�r#)r r+Ztitle_group_mapr�r�Z	group_maprm�mutex_groupr%r%r&�_add_container_actionsds,				z(_ActionsContainer._add_container_actionscKs�d|kr$td�}t|��|jd�ttgkrId|d<|jd�tkrtd|krtd|d<t|d|dg�S)Nr�z1'required' is an invalid argument for positionalsr�Tr�r�r})r{r"r�r
rr|)r r�r�r�r%r%r&r�s
!
z(_ActionsContainer._get_positional_kwargsc	OsJg}g}x�|D]�}|d|jkr]d|d|ji}td�}t||��|j|�|d|jkrt|�dkr|d|jkr|j|�qW|jdd�}|dkr4|r�|d}n
|d}|j|j�}|s"td�}t||��|jdd	�}t|d|d
|�S)Nr�optionrzNinvalid option string %(option)r: must start with a character %(prefix_chars)rrMr�z%dest= is required for options like %rr�r{r})	rr{r9rrgr��lstrip�replacer|)	r rUr�r}Zlong_option_stringsr�r�r�Zdest_option_stringr%r%r&r�s0



z&_ActionsContainer._get_optional_kwargscCs%|jd|�}|jd||�S)Nrm)r�r)r r�r�rmr%r%r&r �sz#_ActionsContainer._pop_action_classcCsVd|j}yt||�SWn1tk
rQtd�}t||j��YnXdS)Nz_handle_conflict_%sz%invalid conflict_resolution value: %r)r
r-r�r{r9)r Zhandler_func_namer�r%r%r&r�s

z_ActionsContainer._get_handlercCslg}x@|jD]5}||jkr|j|}|j||f�qW|rh|j�}|||�dS)N)r}rrr)r rmZconfl_optionalsr�Zconfl_optionalr
r%r%r&r*�s
z!_ActionsContainer._check_conflictcCsKtddt|��}djdd�|D��}t|||��dS)Nzconflicting option string: %szconflicting option strings: %sz, cSsg|]\}}|�qSr%r%)rSr�rmr%r%r&rV�s	z<_ActionsContainer._handle_conflict_error.<locals>.<listcomp>)rrgrr)r rm�conflicting_actionsr�Zconflict_stringr%r%r&�_handle_conflict_error�s
z(_ActionsContainer._handle_conflict_errorcCsWxP|D]H\}}|jj|�|jj|d�|js|jj|�qWdS)N)r}r-rr�r+r.)r rmr5r�r%r%r&�_handle_conflict_resolve�s
	z*_ActionsContainer._handle_conflict_resolve)rr+r,rLrrrrror'r)r#r.r1rrr rr*r6r7r%r%)r�r&r�s$4	
/($		rcsLeZdZdd�fdd�Z�fdd�Z�fdd�Z�S)r&Ncs�|j}|d|j�|d|j�|d|j�tt|�j}|d||�||_g|_|j	|_	|j
|_
|j|_|j|_|j
|_
|j|_dS)Nr
rrr
)r�r
rrr�r&rLr/r�rrrrrr)r r+r/r
r�rZ
super_init)r�r%r&rL�s			z_ArgumentGroup.__init__cs,tt|�j|�}|jj|�|S)N)r�r&r#r�r)r rm)r�r%r&r#sz_ArgumentGroup._add_actioncs*tt|�j|�|jj|�dS)N)r�r&r.r�r-)r rm)r�r%r&r.sz_ArgumentGroup._remove_action)rr+r,rLr#r.r%r%)r�r&r&�sr&cs=eZdZd�fdd�Zdd�Zdd�Z�S)r(Fcs,tt|�j|�||_||_dS)N)r�r(rLr��
_container)r r+r�)r�r%r&rLs	z _MutuallyExclusiveGroup.__init__cCsG|jr!td�}t|��|jj|�}|jj|�|S)Nz-mutually exclusive arguments must be optional)r�r{r9r8r#r�r)r rmr�r%r%r&r#s	z#_MutuallyExclusiveGroup._add_actioncCs$|jj|�|jj|�dS)N)r8r.r�r-)r rmr%r%r&r.$sz&_MutuallyExclusiveGroup._remove_action)rr+r,rLr#r.r%r%)r�r&r(sr(cs�eZdZddddgedddddd�fdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dddd�Z
dddd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zdd1d2�Zdd3d4�Zdd5d6�Zd7dd8d9�Zd:d;�Z�S)<rNr��errorTc
s�tt|�j}
|
d|d|d|	d|
�|dkrVtjjtjd�}||_||_	||_
||_||_||_
||_|j}|td��|_|td��|_d|_dd	�}|jd
d|�d|krdn|d}|j
rI|j|d|d
ddddtdtd��xM|D]E}|j|�y
|j}Wntk
r�YqPX|jj|�qPWdS)Nr
rrr
rzpositional argumentszoptional argumentscSs|S)Nr%)r�r%r%r&�identitybsz)ArgumentParser.__init__.<locals>.identityrr��hr1rirmr�zshow this help message and exit)r�rrLr6�path�basenamer��argvrJrb�epilog�formatter_class�fromfile_prefix_chars�add_help�allow_abbrevr'r{�_positionals�
_optionals�_subparsersrrorr1rr�r)r rJrbr
r?�parentsr@rrArr
rBrCZ	superinitZ	add_groupr:Zdefault_prefixrQZdefaults)r�r%r&rL<sB										




zArgumentParser.__init__cs/ddddddg}�fdd�|D�S)	NrJrbr
r@r
rBcs%g|]}|t�|�f�qSr%)r-)rSr#)r r%r&rV�s	z.ArgumentParser._get_kwargs.<locals>.<listcomp>r%)r r�r%)r r&r|s	zArgumentParser._get_kwargsc	KsA|jdk	r"|jtd��|jdt|��d|ksPd|kr�t|jdd��}t|jdd��}|j||�|_n|j|_|jd�dkr	|j	�}|j
�}|j}|j|j
||d�|j�j�|d<|j|d�}|d	g|�}|jj|�|S)
Nz(cannot have multiple subparser argumentsr�r/r
ZsubcommandsrJrWr	r})rFr9r{r�rr�r'rDr�r��_get_positional_actionsrrfrbrZrrr r#)	r r�r/r
rPr�rdZ
parsers_classrmr%r%r&�add_subparsers�s$	zArgumentParser.add_subparserscCs0|jr|jj|�n|jj|�|S)N)r}rEr#rD)r rmr%r%r&r#�s	zArgumentParser._add_actioncCsdd�|jD�S)NcSsg|]}|jr|�qSr%)r})rSrmr%r%r&rV�s	z8ArgumentParser._get_optional_actions.<locals>.<listcomp>)r)r r%r%r&�_get_optional_actions�s	z$ArgumentParser._get_optional_actionscCsdd�|jD�S)NcSsg|]}|js|�qSr%)r})rSrmr%r%r&rV�s	z:ArgumentParser._get_positional_actions.<locals>.<listcomp>)r)r r%r%r&rH�s	z&ArgumentParser._get_positional_actionscCsH|j||�\}}|rDtd�}|j|dj|��|S)Nzunrecognized arguments: %srt)r�r{r9r)r rUr/r>r�r%r%r&�
parse_args�s
zArgumentParser.parse_argscCsk|dkr"tjdd�}nt|�}|dkrCt�}xW|jD]L}|jtk	rMt||j�sM|jtk	rMt	||j|j�qMWx7|j
D],}t||�s�t	|||j
|�q�WyX|j||�\}}t|t�r$|j
t|t��t|t�||fSWn5tk
rftj�d}|jt|��YnXdS)NrM)r�r>r�r
rr�rr�r�r.r�_parse_known_argsr�r�r-�delattrr�exc_infor9r�)r rUr/rmr��errr%r%r&r��s,	

zArgumentParser.parse_known_argscs.�	jdk	r�	j���i�x~�	jD]s}|j}xat|j�D]P\}}�j|g�}|j|d|��|j||dd��qMWq.Wi�g}t��}	x�t|	�D]�\}}
|
dkr|jd�x_|	D]}
|jd�q�Wq��	j	|
�}|dkr4d}n|�|<d}|j|�q�Wdj
|��t��t��d�����	fdd�������	�fd	d
�}
�	j������	�fdd�}g�d
�
�rt
��}nd}x��
|kr�t�
fdd��D��}�
|krm|�
�}|�
krg|�
qn|�
�
�kr���
|�}�j|�|�
|
�
��
qW|�
�}�j�|d��g}x��	jD]�}|�kr�|jr|jt|��q�|jdk	r�t|jt�r�t�|j�r�|jt�|j�kr�t�|j�	j||j��q�W|r��	jtd�dj
|��xw�	jD]l}|jr�xZ|jD]}|�kr�Pq�Wdd�|jD�}td�}�	j|dj
|��q�W��fS)NrMz--r��A�OrWcs��j|��j||�}||jk	r��j|�xQ�j|g�D]=}|�krNtd�}t|�}t|||��qNW|tk	r�|��||�dS)Nznot allowed with argument %s)r��_get_valuesr�r�r{r�rr)rmZargument_stringsr�Zargument_valuesZconflict_actionr�Zaction_name)�action_conflictsr/�seen_actions�seen_non_default_actionsr r%r&�take_actions

z5ArgumentParser._parse_known_args.<locals>.take_actioncs�|}|\}}}�j}g}x�|dkrP�j�|�|dS|dk	ry||d�}�j}|dkr|d|kr|j|g|f�|d}	|	|d}|dd�p�d}
�j}||kr�||}|
}qvtd�}t|||��q�|dkrW|d}
|g}|j|||f�Pq�td�}t|||��q+|d}�|d�}|||�}||}
�||
�}|j|||f�Pq+Wx'|D]\}}}�|||�q�W|
S)NrMrPrzignored explicit argument %r)�_match_argumentrrrr{r)�start_index�option_tuplermr��explicit_argZmatch_argumentZ
action_tuples�	arg_countr$�charZnew_explicit_argZ
optionals_mapr��stoprUr�Zselected_patterns)r!�arg_strings_pattern�extras�option_string_indicesr rVr%r&�consume_optional+sN
		
	
	
	

z:ArgumentParser._parse_known_args.<locals>.consume_optionalcs��j}�|d�}|�|�}xHt�|�D]7\}}�|||�}||7}�||�q8W�t|�d��dd�<|S)N)�_match_arguments_partial�ziprg)rXZ
match_partialZselected_patternZ
arg_countsrmr[rU)r!r^r�r rVr%r&�consume_positionalsxs	
 z=ArgumentParser._parse_known_args.<locals>.consume_positionalsrcs"g|]}|�kr|�qSr%r%)rSr�)rXr%r&rV�s	z4ArgumentParser._parse_known_args.<locals>.<listcomp>z(the following arguments are required: %sz, cSs+g|]!}|jtk	rt|��qSr%)rirr�)rSrmr%r%r&rV�s	z#one of the arguments %s is requiredrtr�)rA�_read_args_from_filesrr�r�r�r��iterr�_parse_optionalrr�rHr>r=rr�r�r�r�r�r�r�r-r.�
_get_valuer9r{)r r!r/r0r�r�Zmutex_actionZ	conflictsZarg_string_pattern_partsZarg_strings_iter�
arg_stringrY�patternrardZmax_option_string_indexZnext_option_string_indexZpositionals_end_indexZstringsZ
stop_indexZrequired_actionsrmr�r�r�r%)rSr!r^r_r/r`r�rTrUr rXrVr&rL�s�	#

	
		!!J

			
z ArgumentParser._parse_known_argscCsg}x�|D]�}|s-|d|jkr=|j|�q
y�t|dd���m}g}xA|j�j�D]-}x$|j|�D]}|j|�q�WqrW|j|�}|j|�WdQRXWq
tk
r�t	j
�d}|jt|��Yq
Xq
W|S)NrrM)
rArr��readr��convert_arg_line_to_argsrer�r�r�rNr9r�)r r!Znew_arg_stringsriZ	args_file�arg_liner"rOr%r%r&re�s 

z$ArgumentParser._read_args_from_filescCs|gS)Nr%)r rmr%r%r&rl�sz'ArgumentParser.convert_arg_line_to_argscCs�|j|�}tj||�}|dkr�dtd�ttd�ttd�i}tdd|j�|j}|j|j|�}t	||��t
|jd��S)Nzexpected one argumentzexpected at most one argumentzexpected at least one argumentzexpected %s argumentzexpected %s argumentsrM)�_get_nargs_patternrFr,r{r
rrr�r�rrgr�)r rmr^�
nargs_patternr,Znargs_errorsr�r�r%r%r&rW�szArgumentParser._match_argumentcs�g}x�tt|�dd�D]w}|d|�}dj�fdd�|D��}tj||�}|dk	r|jdd�|j�D��PqW|S)NrrMrWcsg|]}�j|��qSr%)rn)rSrm)r r%r&rVs	z;ArgumentParser._match_arguments_partial.<locals>.<listcomp>cSsg|]}t|��qSr%)rg)rSr�r%r%r&rVs	r�)r�rgrrFr,r�rd)r rcr^r�r�Z
actions_slicerjr,r%)r r&rbs
 z'ArgumentParser._match_arguments_partialc
Cs�|s
dS|d|jkr!dS||jkrJ|j|}||dfSt|�dkr`dSd|kr�|jdd�\}}||jkr�|j|}|||fS|jrD|j|�}t|�dkr%djdd�|D��}d|d|i}td	�}|j||�nt|�dkrD|\}	|	S|j	j
|�rc|jscdSd
|krsdSd|dfS)NrrM�=z, cSsg|]\}}}|�qSr%r%)rSrmr�rZr%r%r&rV?s	z2ArgumentParser._parse_optional.<locals>.<listcomp>r2Zmatchesz4ambiguous option: %(option)s could match %(matches)srt)rrrg�splitrC�_get_option_tuplesrr{r9rr,r)
r rirmr�rZZ
option_tuplesZoptionsrUr�rYr%r%r&rgs>



	
		zArgumentParser._parse_optionalc
Cs�g}|j}|d|kr�|d|kr�d|krV|jdd�\}}n|}d}x6|jD]>}|j|�rl|j|}|||f}|j|�qlWn�|d|kr�|d|kr�|}d}|dd�}|dd�}	x�|jD]v}||krE|j|}|||	f}|j|�q|j|�r|j|}|||f}|j|�qWn|jtd�|�|S)NrrMrpr1zunexpected option string: %s)rrqr�
startswithrr9r{)
r r�r�r$Z
option_prefixrZrmr�Zshort_option_prefixZshort_explicit_argr%r%r&rrZs8	 
 

z!ArgumentParser._get_option_tuplescCs�|j}|dkrd}n�|tkr3d}nk|tkrHd}nV|tkr]d}nA|tkrrd}n,|tkr�d}nddjd	|�}|jr�|jdd
�}|jdd
�}|S)Nz(-*A-*)z(-*A?-*)z	(-*[A-]*)z
(-*A[A-]*)z([-AO]*)z(-*A[-AO]*)z(-*%s-*)z-*rPrWr�)	r�r
rrrrrr}r4)r rmr�ror%r%r&rn�s$								z!ArgumentParser._get_nargs_patterncs��jttgkr;y|jd�Wntk
r:YnX|r��jtkr��jrf�j}n	�j}t	|t
�r��j�|�}�j�|�nV|r��jt
kr��jr��jdk	r��j}n|}�j�|�nt|�dkrL�jdtgkrL|\}�j�|�}�j�|�n��jtkrz��fdd�|D�}n�jtkr���fdd�|D�}�j�|d�n=��fdd�|D�}x|D]}�j�|�q�W|S)Nz--rMcs"g|]}�j�|��qSr%)rh)rS�v)rmr r%r&rV�s	z.ArgumentParser._get_values.<locals>.<listcomp>cs"g|]}�j�|��qSr%)rh)rSrt)rmr r%r&rV�s	rcs"g|]}�j�|��qSr%)rh)rSrt)rmr r%r&rV�s	)r�rrr-r9r
r}r�r�r�r�rh�_check_valuerrg)r rmr!r$rirtr%)rmr r&rR�s>
		
'	
zArgumentParser._get_valuescCs|jd|j|j�}t|�sFtd�}t|||��y||�}Wn�tk
r�t|jdt|j��}tt	j
�d�}t||��Yngttfk
rt|jdt|j��}d|d|i}td�}t|||��YnX|S)Nrz%r is not callablerrMr$z!invalid %(type)s value: %(value)r)
rrr!r{rrr-rr�r�rNr"r9)r rmrir%r�r�r#rUr%r%r&rh�s 
zArgumentParser._get_valuecCsh|jdk	rd||jkrdd|ddjtt|j��i}td�}t|||��dS)Nr$r�z, z3invalid choice: %(value)r (choose from %(choices)s))r�r�maprr{r)r rmr$rUr�r%r%r&ru	s
!zArgumentParser._check_valuecCs2|j�}|j|j|j|j�|j�S)N)r�rfrbrrrZ)r rPr%r%r&�format_usage	s
zArgumentParser.format_usagecCs�|j�}|j|j|j|j�|j|j�xK|jD]@}|j|j	�|j|j�|j
|j�|j�qBW|j|j
�|j�S)N)r�rfrbrrr`r
rr\r/rpr�r]r?rZ)r rPZaction_groupr%r%r&rZ	s
zArgumentParser.format_helpcCs|jd|j�S)NrJ)r@rJ)r r%r%r&r�(	szArgumentParser._get_formattercCs/|dkrtj}|j|j�|�dS)N)r�r�r�rw)r �filer%r%r&�print_usage.	s	zArgumentParser.print_usagecCs/|dkrtj}|j|j�|�dS)N)r�r�r�rZ)r rxr%r%r&r�3	s	zArgumentParser.print_helpcCs,|r(|dkrtj}|j|�dS)N)r��stderr�write)r r�rxr%r%r&r�8	s	zArgumentParser._print_messagercCs*|r|j|tj�tj|�dS)N)r�r�rzr�)r Zstatusr�r%r%r&r�A	szArgumentParser.exitcCsC|jtj�d|jd|i}|jdtd�|�dS)NrJr�r1z%(prog)s: error: %(message)s
)ryr�rzrJr�r{)r r�rUr%r%r&r9F	s	zArgumentParser.error)rr+r,rrLrrIr#rJrHrKr�rLrerlrWrbrgrrrnrRrhrurwrZr�ryr�r�r�r9r%r%)r�r&r)sL4#�;,,4	)5�__version__�__all__�collectionsr�r�r��osr6�rerF�sysr��textwrapr�rr{rrr
rrrrr�r�rr0rrrrr	r��	Exceptionrrrr�r�r�r�r�r�r�r�r�r�rr
rr&r(rr%r%r%r&�<module>@sx	
��
	[#%`6�4"

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.