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__/pathlib.cpython-35.pyc



���\���@sPddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
mZmZddlmZddlmZmZmZmZmZmZmZddlmZdZejd	krUddlZej �dd
�ddfkrFddlm!Z!nd
ZdZ!ndZddddddgZ"dd�Z#Gdd�de$�Z%Gdd�de%�Z&Gdd�de%�Z'e&�Z(e'�Z)Gdd�d�Z*Gdd�de*�Z+e+�Z,ed d!��Z-d"d#�Z.e/ed$�rDej0�e.�Z.Gd%d&�d&�Z1Gd'd(�d(�Z2Gd)d*�d*e1�Z3Gd+d,�d,e1�Z4Gd-d.�d.e1�Z5Gd/d0�d0e	�Z6Gd1d�de$�Z7Gd2d�de7�Z8Gd3d�de7�Z9Gd4d�de7�Z:Gd5d�de:e8�Z;Gd6d�de:e9�Z<dS)7�N)�Sequence)�contextmanager)�EINVAL�ENOENT�ENOTDIR)�
attrgetter)�S_ISDIR�S_ISLNK�S_ISREG�S_ISSOCK�S_ISBLK�S_ISCHR�S_ISFIFO)�quote_from_bytesT�nt��)�_getfinalpathnameF�PurePath�
PurePosixPath�PureWindowsPath�Path�	PosixPath�WindowsPathcCs"d|kp!d|kp!d|kS)N�*�?�[�)�patrr�7/opt/rh/rh-python35/root/usr/lib64/python3.5/pathlib.py�_is_wildcard_pattern&sr c@s:eZdZdZdd�Zdd�Zdd�ZdS)	�_FlavourzPA flavour implements a particular (platform-specific) set of path
    semantics.cCs|jj|_dS)N)�sep�join)�selfrrr�__init__0sz_Flavour.__init__cCs�g}|j}|j}d}}t|�}x%|D]}|sDq5|r\|j||�}|j|�\}}}	||	kr�xpt|	j|��D].}
|
r�|
dkr�|jtj|
��q�Wn(|	r�|	dkr�|jtj|	��|s�|r5|sQxI|D]A}|sq|r3|j||�}|j|�d}|rPqWPq5W|sb|rs|j||�|j	�|||fS)N��.r)
r"�altsep�reversed�replace�	splitroot�split�append�sys�intern�reverse)r$�partsZparsedr"r(�drv�root�it�partZrel�xrrr�parse_parts3s@		



z_Flavour.parse_partscCs�|r8|r�|r�||||g|dd�fSn_|r�||ksh|j|�|j|�kr�||||dd�fSn||||fS|||fS)z�
        Join the two paths represented by the respective
        (drive, root, parts) tuples.  Return a new (drive, root, parts) tuple.
        �N)�casefold)r$r2r3r1Zdrv2Zroot2Zparts2rrr�join_parsed_partsYs
%*z_Flavour.join_parsed_partsN)�__name__�
__module__�__qualname__�__doc__r%r7r:rrrrr!,s&r!c@sWeZdZdZdZdZeZej	dkZ
edd�ee
d�e
d�d	�D��ed
d�ee
d�e
d�d	�D��BZd
Zddddhdd�ed	d�D�Bdd�ed	d�D�BZedd�Zdd�Zdd�Zdd�Zedd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(S))�_WindowsFlavour�\�/Trccs|]}t|�VqdS)N)�chr)�.0r6rrr�	<genexpr>wsz_WindowsFlavour.<genexpr>�a�zr8ccs|]}t|�VqdS)N)rB)rCr6rrrrDxs�A�Zz\\?\ZCONZPRNZAUXZNULcCsh|]}d|�qS)zCOM%dr)rC�irrr�	<setcomp>~s	z_WindowsFlavour.<setcomp>�
cCsh|]}d|�qS)zLPT%dr)rCrIrrrrJs	cCs�|dd�}|dd�}||krp||krp|j|�\}}|dd�}|dd�}nd}|dd�}||krZ||krZ||krZ|j|d�}|dkrZ|j||d�}||dkrZ|dkrt|�}|r5||d|�|||dd�fS|d|�|||dd�fSd}	}
|dkr�||jkr�|dd�}	|dd�}|}||kr�|}
|j|�}||	|
|fS)	Nrr8rr&��:���rN)�_split_extended_path�find�len�
drive_letters�lstrip)r$r5r"�first�second�prefixZthird�indexZindex2r2r3rrrr+�s6$)%
z_WindowsFlavour.splitrootcCs
|j�S)N)�lower)r$�srrrr9�sz_WindowsFlavour.casefoldcCsdd�|D�S)NcSsg|]}|j��qSr)rX)rC�prrr�
<listcomp>�s	z2_WindowsFlavour.casefold_parts.<locals>.<listcomp>r)r$r1rrr�casefold_parts�sz_WindowsFlavour.casefold_partscCs?t|�}|stj�Stdk	r;|jt|��SdS)N)�str�os�getcwdr�_ext_to_normal)r$�pathrYrrr�resolve�s
z_WindowsFlavour.resolvecCsvd}|j|�rl|dd�}|dd�}|jd�rl||dd�7}d|dd�}||fS)Nr&�zUNC\rLr@)�
startswith)r$rYZ
ext_prefixrVrrrrO�sz$_WindowsFlavour._split_extended_pathcCs|j|�dS)Nr8)rO)r$rYrrrr`�sz_WindowsFlavour._ext_to_normalcCsE|s
dS|djd�r!dS|djd�dj�|jkS)NFrz\\r8r'rN)rd�	partition�upper�reserved_names)r$r1rrr�is_reserved�s
z_WindowsFlavour.is_reservedcCs�|j}t|�dkrg|ddkrg|j�dd�jd�}d|t|jd��fSdt|j�jd��SdS)Nrr8rMrAz
file:///%s/%szutf-8zfile:)�driverQ�as_posixrS�urlquote_from_bytes�encode)r$rari�restrrr�make_uri�s	"z_WindowsFlavour.make_uric
CsAdtjkrtjd}nzdtjkr>tjd}n[dtjkr�ytjd}Wntk
rxd}YnX|tjd}ntd��|r=tjd|kr=|j|f�\}}}|d
tjdkr�td	|��||d<|s
|r.|||j|dd��}n|j|�}|S)N�HOMEZUSERPROFILEZHOMEPATHZ	HOMEDRIVEr&zCan't determine home directoryZUSERNAMEr8z%Can't determine home directory for %rrNrN)r^�environ�KeyError�RuntimeErrorr7r#)r$�username�userhomer2r3r1rrr�
gethomedir�s,


$z_WindowsFlavour.gethomedirN)r;r<r=r"r(�has_drv�ntpath�pathmodr^�name�is_supported�set�range�ordrRZext_namespace_prefixrgr+r9r\rbrOr`rhrnrurrrrr?ks&/3)	'	
r?c@s�eZdZdZdZdZeZej	dkZ
edd�Zdd�Zd	d
�Z
dd�Zd
d�Zdd�Zdd�ZdS)�
_PosixFlavourrAr&FrcCss|rb|d|krb|j|�}t|�t|�dkrRd|d|fSd||fSn
dd|fSdS)Nrrr&)rSrQ)r$r5r"Z
stripped_partrrrr+sz_PosixFlavour.splitrootcCs|S)Nr)r$rYrrrr9sz_PosixFlavour.casefoldcCs|S)Nr)r$r1rrrr\sz_PosixFlavour.casefold_partscsj|j�|j�i�����fdd��|j�rEdn	tj�}�|t|��pi�S)Ncs)|j��rd}x
|j��D]�}|s%|dkrAq%|dkrh|j��\}}}q%|�|}|�kr��|}|dk	r�q%td|��y�j|�}Wn=tk
r�}z|jtkr��|}WYdd}~Xq%Xd�|<�||�}|�|<q%W|S)Nr&r'z..zSymlink loop from %r)rdr,�
rpartitionrr�readlink�OSError�errnor)rarmry�_�newpath�target�e)�_resolve�accessor�seenr"rrr�$s0

z'_PosixFlavour.resolve.<locals>._resolver&)r"�	_accessor�is_absoluter^r_r])r$ra�baser)r�r�r�r"rrb s		%z_PosixFlavour.resolvecCsdS)NFr)r$r1rrrrhLsz_PosixFlavour.is_reservedcCst|�}dt|�S)Nzfile://)�bytesrk)r$raZbpathrrrrnOsz_PosixFlavour.make_uricCs�|sOytjdSWq�tk
rKddl}|jtj��jSYq�XnEddl}y|j|�jSWn"tk
r�td|��YnXdS)Nrorz%Can't determine home directory for %r)	r^rprq�pwd�getpwuid�getuid�pw_dir�getpwnamrr)r$rsr�rrrruUs

z_PosixFlavour.gethomedirN)r;r<r=r"r(rv�	posixpathrxr^ryrzr+r9r\rbrhrnrurrrrr~s,r~c@seZdZdZdS)�	_AccessorzjAn accessor implements a particular (system-specific or not) way of
    accessing paths on the filesystem.N)r;r<r=r>rrrrr�isr�c@sEeZdZdd�Zdd�Zeej�Zeej�Zeej�Zeej	�Z	eej
�Z
eed�r�eej�Zndd�Zeej
�Z
eej�Zeej�Zeej�Zeej�Zerereej�Zq&dd	�Zned
d	��Zeej�Zdd�Zd
S)�_NormalAccessorcs+tj���fdd��}t|�S)Ncs�t|�|�S)N)r])�pathobj�args)�strfuncrr�wrappedqsz._NormalAccessor._wrap_strfunc.<locals>.wrapped)�	functools�wraps�staticmethod)r�r�r)r�r�
_wrap_strfuncps!z_NormalAccessor._wrap_strfunccs+tj���fdd��}t|�S)Ncs�t|�t|�|�S)N)r])ZpathobjAZpathobjBr�)r�rrr�wsz5_NormalAccessor._wrap_binary_strfunc.<locals>.wrapped)r�r�r�)r�r�r)r�r�_wrap_binary_strfuncvs!z$_NormalAccessor._wrap_binary_strfunc�lchmodcCstd��dS)Nz%lchmod() not available on this system)�NotImplementedError)r$r��moderrrr��sz_NormalAccessor.lchmodcCstd��dS)Nz&symlink() not available on this system)r�)rE�b�target_is_directoryrrr�symlink�sz_NormalAccessor.symlinkcCstjt|�t|��S)N)r^r�r])rEr�r�rrrr��scCs
tj|�S)N)r^r�)r$rarrrr��sz_NormalAccessor.readlinkN)r;r<r=r�r�r^�stat�lstat�open�listdir�chmod�hasattrr��mkdir�unlink�rmdir�renamer*r�supports_symlinksr�r��utimer�rrrrr�ns,r�c#sdy�j�VWnMtk
r_i���fdd�}d|_z	|VWd�j�XYnXdS)Ncs=y�|SWn*tk
r8�|�}�|<|SYnXdS)N)rq)r��value)�cache�funcrr�wrapper�s

z_cached.<locals>.wrapperT)�
__cached__�AttributeError�clear)r�r�r)r�r�r�_cached�s	
		r�cCsr|d}|dd�}|dkr/t}n6d|krJtd��nt|�r_t}nt}|||�S)Nrr8z**z:Invalid pattern: '**' can only be an entire path component)�_RecursiveWildcardSelector�
ValueErrorr �_WildcardSelector�_PreciseSelector)�
pattern_partsr�child_parts�clsrrr�_make_selector�s
		r��	lru_cachec@s.eZdZdZdd�Zdd�ZdS)�	_SelectorzYA selector matches a specific glob pattern part against the children
    of a given path.cCs1||_|r!t|�|_nt�|_dS)N)r�r��	successor�_TerminatingSelector)r$r�rrrr%�s	z_Selector.__init__cCs@t|�}|j}|j}|jj}|j||||�S)zuIterate over all child paths of `parent_path` matched by this
        selector.  This can contain parent_path itself.)�type�is_dir�existsr�r��_select_from)r$�parent_pathZpath_clsr�r�r�rrr�select_from�s
		z_Selector.select_fromN)r;r<r=r>r%r�rrrrr��sr�c@seZdZdd�ZdS)r�ccs	|VdS)Nr)r$r�r�r�r�rrrr��sz!_TerminatingSelector._select_fromN)r;r<r=r�rrrrr��sr�c@s(eZdZdd�Zdd�ZdS)r�cCs||_tj||�dS)N)ryr�r%)r$ryr�rrrr%�s	z_PreciseSelector.__init__ccs]||�sdS|j|j�}||�rYx(|jj||||�D]}|VqJWdS)N)�_make_child_relpathryr�r�)r$r�r�r�r�rarZrrrr��s"z_PreciseSelector._select_fromN)r;r<r=r%r�rrrrr��sr�c@s(eZdZdd�Zdd�ZdS)r�cCs/tjtj|��|_tj||�dS)N)�re�compile�fnmatch�	translaterr�r%)r$rr�rrrr%sz_WildcardSelector.__init__c
cs�||�sdS|jj}xl||�D]^}||�}|jj|�r)|j|�}x(|jj||||�D]}	|	VqxWq)WdS)N)�_flavourr9r�matchr�r�r�)
r$r�r�r�r��cfryZ
casefoldedrarZrrrr�s"z_WildcardSelector._select_fromN)r;r<r=r%r�rrrrr��sr�c@s4eZdZdd�Zdd�Zdd�ZdS)r�cCstj||�dS)N)r�r%)r$rr�rrrr%sz#_RecursiveWildcardSelector.__init__ccs`|VxT||�D]F}|j|�}||�rx"|j|||�D]}|VqIWqWdS)N)r��_iterate_directories)r$r�r�r�ryrarZrrrr�sz/_RecursiveWildcardSelector._iterate_directoriesc	cs�||�sdSt|���}t�}zn|jj}x[|j|||�D]D}x;|||||�D]$}||kri|V|j|�qiWqMWWd|j�XWdQRXdS)N)r�r{r�r�r��addr�)	r$r�r�r�r�ZyieldedZsuccessor_selectZstarting_pointrZrrrr�s	z'_RecursiveWildcardSelector._select_fromN)r;r<r=r%r�r�rrrrr�sr�c@sLeZdZdZdZdd�Zdd	�Zd
d�Zdd
�ZdS)�_PathParentszvThis object provides sequence-like access to the logical ancestors
    of a path.  Don't try to construct it yourself.�_pathcls�_drv�_root�_partscCs7t|�|_|j|_|j|_|j|_dS)N)r�r�r�r�r�)r$rarrrr%6sz_PathParents.__init__cCs4|js|jr#t|j�dSt|j�SdS)Nr8)r�r�rQr�)r$rrr�__len__=sz_PathParents.__len__cCsX|dks|t|�kr*t|��|jj|j|j|jd|d��S)Nrr8)rQ�
IndexErrorr��_from_parsed_partsr�r�r�)r$�idxrrr�__getitem__Csz_PathParents.__getitem__cCsdj|jj�S)Nz<{}.parents>)�formatr�r;)r$rrr�__repr__Isz_PathParents.__repr__N)z_pathclsz_drvz_rootz_parts)	r;r<r=r>�	__slots__r%r�r�r�rrrrr�1sr�c@s\eZdZdZdXZd	d
�Zdd�Zed
d��Zeddd��Z	eddd��Z
edd��Zdd�Zdd�Z
dd�Zdd�Zdd�Zd d!�Zd"d#�Zed$d%��Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zeed�d2d3�Zeed�d2d4�Zed5d6��Zed7d8��Zed9d:��Z ed;d<��Z!ed=d>��Z"d?d@�Z#dAdB�Z$dCdD�Z%edEdF��Z&dGdH�Z'dIdJ�Z(dKdL�Z)edMdN��Z*edOdP��Z+dQdR�Z,dSdT�Z-dUdV�Z.dWS)YraHPurePath represents a filesystem path and offers operations which
    don't imply any actual filesystem I/O.  Depending on your system,
    instantiating a PurePath will return either a PurePosixPath or a
    PureWindowsPath object.  You can also instantiate either of these classes
    directly, regardless of your system.
    r�r�r��_str�_hash�_pparts�_cached_cpartscGs4|tkr'tjdkr!tnt}|j|�S)z�Construct a PurePath from one or several strings and or existing
        PurePath objects.  The strings and path objects are combined so as
        to yield a canonicalized path, which is incorporated into the
        new PurePath object.
        r)rr^ryrr�_from_parts)r�r�rrr�__new__YszPurePath.__new__cCs|jt|j�fS)N)�	__class__�tupler�)r$rrr�
__reduce__cszPurePath.__reduce__cCs�g}xh|D]`}t|t�r2||j7}q
t|t�rW|jt|��q
tdt|���q
W|jj|�S)Nz/argument should be a path or str object, not %r)	�
isinstancerr�r]r-�	TypeErrorr�r�r7)r�r�r1rErrr�_parse_argshs
zPurePath._parse_argsTcCsVtj|�}|j|�\}}}||_||_||_|rR|j�|S)N)�objectr�r�r�r�r��_init)r�r��initr$r2r3r1rrrr�ys			
zPurePath._from_partscCs>tj|�}||_||_||_|r:|j�|S)N)r�r�r�r�r�r�)r�r2r3r1r�r$rrrr��s			
zPurePath._from_parsed_partscCsB|s|r.|||jj|dd��S|jj|�SdS)Nr8)r�r#)r�r2r3r1rrr�_format_parsed_parts�s"zPurePath._format_parsed_partscCsdS)Nr)r$rrrr��szPurePath._initcCs^|j|�\}}}|jj|j|j|j|||�\}}}|j|||�S)N)r�r�r:r�r�r�r�)r$r�r2r3r1rrr�_make_child�s	*zPurePath._make_childcCsRy|jSWn@tk
rM|j|j|j|j�p<d|_|jSYnXdS)z[Return the string representation of the path, suitable for
        passing to system calls.r'N)r�r�r�r�r�r�)r$rrr�__str__�s
zPurePath.__str__cCs"|j}t|�j|jd�S)zNReturn the string representation of the path with forward (/)
        slashes.rA)r�r]r*r")r$�frrrrj�s	zPurePath.as_posixcCstjt|��S)zaReturn the bytes representation of the path.  This is only
        recommended to use under Unix.)r^�fsencoder])r$rrr�	__bytes__�szPurePath.__bytes__cCsdj|jj|j��S)Nz{}({!r}))r�r�r;rj)r$rrrr��szPurePath.__repr__cCs(|j�std��|jj|�S)z Return the path as a 'file' URI.z.relative path can't be expressed as a file URI)r�r�r�rn)r$rrr�as_uri�szPurePath.as_uricCsCy|jSWn1tk
r>|jj|j�|_|jSYnXdS)N)r�r�r�r\r�)r$rrr�_cparts�s

zPurePath._cpartscCs5t|t�stS|j|jko4|j|jkS)N)r�r�NotImplementedr�r�)r$�otherrrr�__eq__�szPurePath.__eq__cCsCy|jSWn1tk
r>tt|j��|_|jSYnXdS)N)r�r��hashr�r�)r$rrr�__hash__�s

zPurePath.__hash__cCs6t|t�s"|j|jk	r&tS|j|jkS)N)r�rr�r�r�)r$r�rrr�__lt__�s"zPurePath.__lt__cCs6t|t�s"|j|jk	r&tS|j|jkS)N)r�rr�r�r�)r$r�rrr�__le__�s"zPurePath.__le__cCs6t|t�s"|j|jk	r&tS|j|jkS)N)r�rr�r�r�)r$r�rrr�__gt__�s"zPurePath.__gt__cCs6t|t�s"|j|jk	r&tS|j|jkS)N)r�rr�r�r�)r$r�rrr�__ge__�s"zPurePath.__ge__�docz.The drive prefix (letter or UNC path), if any.zThe root of the path, if any.cCs|j|j}|S)z/The concatenation of the drive and root, or ''.)r�r�)r$�anchorrrrr�szPurePath.anchorcCs?|j}t|�|js$|jr*dndkr7dS|dS)z!The final path component, if any.r8rr&rN)r�rQr�r�)r$r1rrrry�s	*z
PurePath.namecCsT|j}|jd�}d|ko9t|�dknrL||d�SdSdS)z*The final component's last suffix, if any.r'rr8Nr&)ry�rfindrQ)r$ryrIrrr�suffix�s
	&zPurePath.suffixcCsO|j}|jd�rgS|jd�}dd�|jd�dd�D�S)z1A list of the final component's suffixes, if any.r'cSsg|]}d|�qS)r'r)rCrrrrr[
s	z%PurePath.suffixes.<locals>.<listcomp>r8N)ry�endswithrSr,)r$ryrrr�suffixess
	zPurePath.suffixescCsT|j}|jd�}d|ko9t|�dknrL|d|�S|SdS)z0The final path component, minus its last suffix.r'rr8N)ryrrQ)r$ryrIrrr�stems
	&z
PurePath.stemcCs�|jstd|f��|jj|f�\}}}|s�|d|jj|jjgks�|s�|s�t|�dkr�td|��|j|j|j	|j
dd�|g�S)z-Return a new path with the file name changed.z%r has an empty namer8zInvalid name %rNrNrN)ryr�r�r7r"r(rQr�r�r�r�)r$ryr2r3r1rrr�	with_names	)zPurePath.with_namecCs�|j}|j|ks0|jr@|j|kr@td|��|rV|jd�sb|dkrrtd|��|j}|s�td|f��|j}|s�||}n|dt|��|}|j|j	|j
|jdd�|g�S)zCReturn a new path with the file suffix changed (or added, if none).zInvalid suffix %rr'z%r has an empty nameNr8rN)r�r"r(r�rdryrrQr�r�r�r�)r$rr�ryZ
old_suffixrrr�with_suffix$s	'"		
zPurePath.with_suffixc
GsQ|std��|j}|j}|j}|rP||g|dd�}n|}|j|�\}}}|r�||g|dd�}	n|}	t|	�}
|jj}|
dkr�|p�|n||d|
��||	�kr"|j|||�}t	dj
t|�t|����|jd|
dkr=|nd||
d��S)z�Return the relative path to another path identified by the passed
        arguments.  If the operation is not possible (because this is not
        a subpath of the other path), raise ValueError.
        zneed at least one argumentr8Nrz{!r} does not start with {!r}r&)
r�r�r�r�r�rQr�r\r�r�r�r]r�)
r$r�r1r2r3Z	abs_partsZto_drvZto_rootZto_partsZto_abs_parts�nr�Z	formattedrrr�relative_to7s(				:	zPurePath.relative_tocCs=y|jSWn+tk
r8t|j�|_|jSYnXdS)zZAn object providing sequence-like access to the
        components in the filesystem path.N)r�r�r�r�)r$rrrr1Ws

zPurePath.partscGs
|j|�S)z�Combine this path with one or several arguments, and return a
        new path representing either a subpath (if all arguments are relative
        paths) or a totally different path (if one of the arguments is
        anchored).
        )r�)r$r�rrr�joinpathcszPurePath.joinpathcCs|j|f�S)N)r�)r$�keyrrr�__truediv__kszPurePath.__truediv__cCs|j|g|j�S)N)r�r�)r$rrrr�__rtruediv__nszPurePath.__rtruediv__cCsZ|j}|j}|j}t|�dkr=|s9|r=|S|j|||dd��S)zThe logical parent of the path.r8NrN)r�r�r�rQr�)r$r2r3r1rrr�parentqs			zPurePath.parentcCs
t|�S)z*A sequence of this path's logical parents.)r�)r$rrr�parents{szPurePath.parentscCs'|js
dS|jjp&t|j�S)zSTrue if the path is absolute (has both a root and, if applicable,
        a drive).F)r�r�rv�boolr�)r$rrrr��s	zPurePath.is_absolutecCs|jj|j�S)zaReturn True if the path contains one of the special names reserved
        by the system, if any.)r�rhr�)r$rrrrh�szPurePath.is_reservedc	Cs,|jj}||�}|jj|f�\}}}|sHtd��|rg|||j�krgdS|r�|||j�kr�dS|j}|s�|r�t|�t|�kr�dS|dd�}nt|�t|�kr�dSx?tt	|�t	|��D]"\}}t
j||�sdSqWdS)zE
        Return True if this path matches the given pattern.
        z
empty patternFr8NT)r�r9r7r�r�r�r�rQ�zipr)r�Zfnmatchcase)	r$Zpath_patternr�r2r3Z	pat_partsr1r5rrrrr��s(	(zPurePath.matchN)z_drvz_rootz_partsz_strz_hashz_ppartsz_cached_cparts)/r;r<r=r>r�r�r��classmethodr�r�r�r�r�r�r�rjr�r�r��propertyr�r�r�r�r�rrrrir3rryrrrr	r
rr1r
rrrrr�rhr�rrrrrMs\
	
			
	
 
c@seZdZeZfZdS)rN)r;r<r=�_posix_flavourr�r�rrrrr�sc@seZdZeZfZdS)rN)r;r<r=�_windows_flavourr�r�rrrrr�sc@s\eZdZd`Zdd�Zddd�Zdd	�Zd
d�Zdd
�Zdd�Z	ddd�Z
ddd�Zedd��Z
edd��Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,dadddd.d/�Zd0d1�Zddd2d3�Zd4d5�Zddd6d7�Zdd8d9d:�Zdd;d;d<d=�Zd>d?�Zd@dA�Z dBdC�Z!dDdE�Z"dFdG�Z#dHdI�Z$dJdK�Z%d;dLdM�Z&dNdO�Z'dPdQ�Z(dRdS�Z)dTdU�Z*dVdW�Z+dXdY�Z,dZd[�Z-d\d]�Z.d^d_�Z/dS)brr��_closedcOsl|tkr'tjdkr!tnt}|j|dd�}|jjs^td|j	f��|j
�|S)Nrr�Fz$cannot instantiate %r on your system)rr^ryrrr�r�rzr�r;r�)r�r��kwargsr$rrrr��s
zPath.__new__NcCs1d|_|dk	r$|j|_n	t|_dS)NF)rr��_normal_accessor)r$�templaterrrr��s	z
Path._initcCs)|j|g}|j|j|j|�S)N)r�r�r�r�)r$r5r1rrrr��szPath._make_child_relpathcCs|jr|j�|S)N)r�
_raise_closed)r$rrr�	__enter__�s	
zPath.__enter__cCs
d|_dS)NT)r)r$�t�v�tbrrr�__exit__�sz
Path.__exit__cCstd��dS)NzI/O operation on closed path)r�)r$rrrr�szPath._raise_closedi�cCs|jj|||�S)N)r�r�)r$ry�flagsr�rrr�_opener�szPath._openeri�cCs)|jr|j�|jj|||�S)zm
        Open the file pointed by this path and return a file descriptor,
        as os.open() does.
        )rrr�r�)r$r#r�rrr�	_raw_open�s	
zPath._raw_opencCs|tj��S)zjReturn a new path pointing to the current working directory
        (as returned by os.getcwd()).
        )r^r_)r�rrr�cwd�szPath.cwdcCs||�jjd��S)zrReturn a new path pointing to the user's home directory (as
        returned by os.path.expanduser('~')).
        N)r�ru)r�rrr�home�sz	Path.homecCsS|j�}y|j�}Wn!tk
r?tj|�}YnXtjj||�S)zoReturn whether other_path is the same or not as this file
        (as returned by os.path.samefile()).
        )r�r�r^ra�samestat)r$Z
other_path�stZother_strrr�samefile�s
z
Path.samefileccsd|jr|j�xJ|jj|�D]6}|dkr;q&|j|�V|jr&|j�q&WdS)zyIterate over the files in this directory.  Does not yield any
        result for the special paths '.' and '..'.
        r'�..N>r+r')rrr�r�r�)r$ryrrr�iterdirs	
	zPath.iterdirccs}|jj|�}|jj|f�\}}}|s<|rHtd��tt|��}x|j|�D]}|VqjWdS)z�Iterate over this subtree and yield all existing files (of any
        kind, including directories) matching the given pattern.
        z%Non-relative patterns are unsupportedN)r�r9r7r�r�r�r�)r$�patternr2r3r��selectorrZrrr�globsz	Path.globccs�|jj|�}|jj|f�\}}}|s<|rHtd��tdt|��}x|j|�D]}|VqnWdS)z�Recursively yield all existing files (of any kind, including
        directories) matching the given pattern, anywhere in this subtree.
        z%Non-relative patterns are unsupported�**N)r0)r�r9r7r�r�r�r�)r$r-r2r3r�r.rZrrr�rglob sz
Path.rglobcCs\|jr|j�|j�r#|S|jtj�g|jdd�}|jd|�|S)aReturn an absolute version of this path.  This function works
        even if the path doesn't point to anything.

        No normalization is done, i.e. all '.' and '..' will be kept along.
        Use resolve() to get the canonical path to a file.
        r�Fr)rrr�r�r^r_r�r�)r$�objrrr�absolute,s	
%z
Path.absolutecCs�|jr|j�|jj|�}|dkrM|j�t|j��}|jjj|�}|j	|fdd�}|j
d|�|S)z�
        Make the path absolute, resolving all symlinks on the way and also
        normalizing it (for example turning slashes into backslashes under
        Windows).
        Nr�Fr)rrr�rbr�r]r3rx�normpathr�r�)r$rYZnormedr2rrrrb>s	

zPath.resolvecCs|jj|�S)zh
        Return the result of the stat() system call on this path, like
        os.stat() does.
        )r�r�)r$rrrr�Rsz	Path.statcCs%ddl}|j|j�j�jS)z:
        Return the login name of the file owner.
        rN)r�r�r��st_uidZpw_name)r$r�rrr�ownerYsz
Path.ownercCs%ddl}|j|j�j�jS)z8
        Return the group name of the file gid.
        rN)�grpZgetgrgidr��st_gidZgr_name)r$r7rrr�group`sz
Path.group�rr8c	Cs>|jr|j�tjt|�|||||d|j�S)z|
        Open the file pointed by this path and return a file object, as
        the built-in open() function does.
        Zopener)rr�ior�r]r$)r$r��	buffering�encoding�errors�newlinerrrr�gs	
!z	Path.openc	Cs*|jdd��}|j�SWdQRXdS)zK
        Open the file in bytes mode, read it, and close the file.
        r��rbN)r��read)r$r�rrr�
read_bytesrszPath.read_bytesc	Cs6|jddd|d|��}|j�SWdQRXdS)zJ
        Open the file in text mode, read it, and close the file.
        r�r:r=r>N)r�rA)r$r=r>r�rrr�	read_textys!zPath.read_textc	Cs9t|�}|jdd��}|j|�SWdQRXdS)zO
        Open the file in bytes mode, write to it, and close the file.
        r��wbN)�
memoryviewr��write)r$�dataZviewr�rrr�write_bytes�szPath.write_bytesc	Cs^t|t�s%td|jj��|jddd|d|��}|j|�SWdQRXdS)zN
        Open the file in text mode, write to it, and close the file.
        zdata must be str, not %sr��wr=r>N)r�r]r�r�r;r�rF)r$rGr=r>r�rrr�
write_text�s
!zPath.write_textTcCs�|jr|j�|rIy|jj|d�Wntk
rDYnXdStjtjB}|sl|tjO}|j	||�}tj
|�dS)zS
        Create this file with the given access mode, if it doesn't exist.
        N)rrr�r�r�r^�O_CREAT�O_WRONLY�O_EXCLr%�close)r$r��exist_okr#�fdrrr�touch�s	


z
Path.touchFcCs|jr|j�|s_y|jj||�Wq�tk
r[|sT|j�rW�Yq�Xn�y|jj||�Wn�tk
r�|s�|j�r��Yn]tk
r�}z=|jtkr��|j	jdd�|jj||�WYdd}~XnXdS)NrT)
rrr�r��FileExistsErrorr�r�r�rr)r$r�rrOr�rrrr��s$	


z
Path.mkdircCs*|jr|j�|jj||�dS)zF
        Change the permissions of the path, like os.chmod().
        N)rrr�r�)r$r�rrrr��s	
z
Path.chmodcCs*|jr|j�|jj||�dS)z�
        Like chmod(), except if the path points to a symlink, the symlink's
        permissions are changed, rather than its target's.
        N)rrr�r�)r$r�rrrr��s	
zPath.lchmodcCs'|jr|j�|jj|�dS)zd
        Remove this file or link.
        If the path is a directory, use rmdir() instead.
        N)rrr�r�)r$rrrr��s	
zPath.unlinkcCs'|jr|j�|jj|�dS)zF
        Remove this directory.  The directory must be empty.
        N)rrr�r�)r$rrrr��s	
z
Path.rmdircCs#|jr|j�|jj|�S)z�
        Like stat(), except if the path points to a symlink, the symlink's
        status information is returned, rather than its target's.
        )rrr�r�)r$rrrr��s	
z
Path.lstatcCs*|jr|j�|jj||�dS)z5
        Rename this path to the given path.
        N)rrr�r�)r$r�rrrr��s	
zPath.renamecCs*|jr|j�|jj||�dS)zo
        Rename this path to the given path, clobbering the existing
        destination if it exists.
        N)rrr�r*)r$r�rrrr*�s	
zPath.replacecCs-|jr|j�|jj|||�dS)z�
        Make this path a symlink pointing to the given path.
        Note the order of arguments (self, target) is the reverse of os.symlink's.
        N)rrr�r�)r$r�r�rrr�
symlink_to�s	
zPath.symlink_tocCsVy|j�WnAtk
rQ}z!|jttfkr;�dSWYdd}~XnXdS)z+
        Whether this path exists.
        FNT)r�r�r�rr)r$r�rrrr�szPath.existscCs_yt|j�j�SWnAtk
rZ}z!|jttfkrD�dSWYdd}~XnXdS)z3
        Whether this path is a directory.
        FN)rr��st_moder�r�rr)r$r�rrrr�szPath.is_dircCs_yt|j�j�SWnAtk
rZ}z!|jttfkrD�dSWYdd}~XnXdS)zq
        Whether this path is a regular file (also True for symlinks pointing
        to regular files).
        FN)r
r�rTr�r�rr)r$r�rrr�is_fileszPath.is_filecCs_yt|j�j�SWnAtk
rZ}z!|jttfkrD�dSWYdd}~XnXdS)z7
        Whether this path is a symbolic link.
        FN)r	r�rTr�r�rr)r$r�rrr�
is_symlink-szPath.is_symlinkcCs_yt|j�j�SWnAtk
rZ}z!|jttfkrD�dSWYdd}~XnXdS)z6
        Whether this path is a block device.
        FN)rr�rTr�r�rr)r$r�rrr�is_block_device9szPath.is_block_devicecCs_yt|j�j�SWnAtk
rZ}z!|jttfkrD�dSWYdd}~XnXdS)z:
        Whether this path is a character device.
        FN)r
r�rTr�r�rr)r$r�rrr�is_char_deviceFszPath.is_char_devicecCs_yt|j�j�SWnAtk
rZ}z!|jttfkrD�dSWYdd}~XnXdS)z.
        Whether this path is a FIFO.
        FN)rr�rTr�r�rr)r$r�rrr�is_fifoSszPath.is_fifocCs_yt|j�j�SWnAtk
rZ}z!|jttfkrD�dSWYdd}~XnXdS)z0
        Whether this path is a socket.
        FN)rr�rTr�r�rr)r$r�rrr�	is_socket`szPath.is_socketcCs�|jp|jr}|jr}|jddd�dkr}|jj|jddd��}|j|g|jdd��S|S)zl Return a new path with expanded ~ and ~user constructs
        (as returned by os.path.expanduser)
        rNr8�~)r�r�r�r�rur�)r$Zhomedirrrr�
expanduserms
&#!zPath.expanduser)z	_accessorz_closedrN)0r;r<r=r�r�r�r�rr"rr$r%rr&r'r*r,r/r1r3rbr�r6r9r�rBrCrHrJrQr�r�r�r�r�r�r�r*rSr�r�rUrVrWrXrYrZr\rrrrr�s\	
	
				




c@seZdZfZdS)rN)r;r<r=r�rrrrrysc@seZdZfZdS)rN)r;r<r=r�rrrrr|s)=r�r�r;rwr^r�r�r.�collectionsr�
contextlibrr�rrr�operatorrr�rr	r
rrr
rZurllib.parserrkr�ryrZgetwindowsversionr�__all__r r�r!r?r~rrr�r�rr�r�r�r�r�r�r�r�r�r�rrrrrrrrrr�<module>sd4"		?�b		;	
!�Z��

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.