Your IP : 18.119.124.24


Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/ntpath.cpython-35.opt-2.pyc



���]	Y�'@sddlZddlZddlZddlZddlTddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)g'Zd*Zd+Zd*Zd,Zd-Z	d.Z
d/Zd0ejkr�d1Zd2Z
d3d4�Zd5d�Zd6d�Zd7d�Zd8d�Zd9d�Zd:d�Zd;d�Zejje_d<d	�Zd=d
�Zd>d�Zd?d�Zydd@lmZWnek
r�dZYnXdAd�ZdBd�Z dCd�Z!dDd�Z"yddElm#Z#Wnek
r,dFd�Z$Yn
XdGd�Z$e$Z%e&edH�oaej'�dIdJkZ(ddKd%�Z)dLd)�Z*y9ej'�ddJ�dRkr�ddNlm+Z+ne�Wn$e,efk
r�dOdP�Z+YnXyddQlm-Z.Wnek
rYnXdS)S�N)�*�normcase�isabs�join�
splitdrive�split�splitext�basename�dirname�commonprefix�getsize�getmtime�getatime�getctime�islink�exists�lexists�isdir�isfile�ismount�
expanduser�
expandvars�normpath�abspath�splitunc�curdir�pardir�sep�pathsep�defpath�altsep�extsep�devnull�realpath�supports_unicode_filenames�relpath�samefile�sameopenfile�samestat�
commonpath�.z..�\�;�/z.;C:\binZcez\WindowsZnulcCst|t�rdSdSdS)Ns\/z\/)�
isinstance�bytes)�path�r1�+/opt/alt/python35/lib64/python3.5/ntpath.py�
_get_bothseps#sr3cCs�y?t|t�r(|jdd�j�S|jdd�j�SWnIttfk
r�t|ttf�s�td|jj�d��YnXdS)N�/s\r-r+z0normcase() argument must be str or bytes, not %r)	r.r/�replace�lower�	TypeError�AttributeError�str�	__class__�__name__)�sr1r1r2r-scCs6t|�d}t|�dko5|dt|�kS)N�r)r�lenr3)r<r1r1r2rCsc

Gs�t|t�r$d}d}d}nd}d}d}y5|sQ|dd�|t|�\}}x�|D]�}t|�\}}	|	r�|	d|kr�|s�|r�|}|	}qjn?|r�||kr�|j�|j�kr�|}|	}qj|}|r|d
|kr||}||	}qjW|rb|d|krb|rb|dd�|krb|||S||SWn1tttfk
r�tjd	||��YnXdS)Ns\s\/�:r+z\/�:rr=r���rA)	r.r/rr6r7r8�BytesWarning�genericpath�_check_arg_types)
r0�pathsr�seps�colonZresult_driveZresult_path�pZp_driveZp_pathr1r1r2rJsD	


cCstt|�dkr`t|t�r6d}d}d}nd}d}d}|j||�}|dd�|dkr,|dd	�|kr,|j|d�}|dkr�|dd�|fS|j||d
�}||d
kr�|dd�|fS|dkrt|�}|d|�||d�fS|d
d�|kr`|dd�|dd�fS|dd�|fS)
N�s\r4r?r+r-r@r�r=rArA)r>r.r/r5�find)rHrr rGZnormp�indexZindex2r1r1r2rxs,	0cCsaddl}|jdtd�t|�\}}t|�dkrW|dd�|fS||fS)Nrz<ntpath.splitunc is deprecated, use ntpath.splitdrive insteadrI)�warnings�warn�DeprecationWarningrr>)rHrM�driver0r1r1r2r�s	
cCs�t|�}t|�\}}t|�}x(|rT||d|krT|d8}q-W|d|�||d�}}|j|�p�|}|||fS)Nr=)r3rr>�rstrip)rHrF�d�i�head�tailr1r1r2r�s!cCs?t|t�r%tj|ddd�Stj|ddd�SdS)Ns\r4�.r+r-r*)r.r/rC�	_splitext)rHr1r1r2r�scCst|�dS)Nr=)r)rHr1r1r2r	�scCst|�dS)Nr)r)rHr1r1r2r
�scCsBytj|�}Wnttfk
r1dSYnXtj|j�S)NF)�os�lstat�OSErrorr8�stat�S_ISLNK�st_mode)r0�str1r1r2r�s
	cCs0ytj|�}Wntk
r+dSYnXdS)NFT)rXrYrZ)r0r^r1r1r2rs

	)�_getvolumepathnamecCs�t|�}t|�}t|�\}}|rQ|d|krQ|pP||kS||kradStr�|j|�t|�j|�kSdSdS)NrTF)r3rrr_rQ)r0rF�root�restr1r1r2rs"c
Cset|t�rd}nd}|j|�s1|Sdt|�}}x0||krv||t|�krv|d7}qGWdtjkr�tjd}ntdtjkr�tjd}nUdtjkr�|Sytjd}Wntk
r�d}YnXt|tjd�}t|t�r(tj	|�}|dkrStt
|�|d|��}|||d�S)	N�~�~r=�HOMEZUSERPROFILEZHOMEPATHZ	HOMEDRIVE�)r.r/�
startswithr>r3rX�environ�KeyErrorr�fsencoder
)r0�tilderS�n�userhomerPr1r1r2r0s0	%
cCst|t�r�d|kr+d|kr+|Sddl}t|j|jdd�}d}d}d}d}d}ttd	d�}ncd
|kr�d|kr�|Sddl}|j|jd}d}d}d
}d}d
}tj}|dd�}	d}
t|�}x
|
|kr||
|
d�}||kr�||
dd�}t|�}y/|j	|�}
|	||d|
d�7}	Wqt
k
r�|	||7}	|d}
YqXnQ||kr�||
d|
d�|kr�|	|7}	|
d7}
q||
dd�}t|�}y|j	|�}
Wn*t
k
rZ|	||7}	|d}
YqX|d|
�}
y<|dkr�tjtjtj|
��}n
||
}Wn t
k
r�||
|}YnX|	|7}	n4||kr||
d|
d�|kr|	|7}	|
d7}
q||
d|
d�|kr||
dd�}t|�}y|j	|�}
Wn.t
k
r�|	|||7}	|d}
Yq�X|d|
�}
y<|dkr�tjtjtj|
��}n
||
}Wn$t
k
r|||
|}YnX|	|7}	q|dd�}
|
d7}
||
|
d�}x>|r�||kr�|
|7}
|
d7}
||
|
d�}qKWy<|dkr�tjtjtj|
��}n
||
}Wnt
k
r�||
}YnX|	|7}	|r|
d8}
n
|	|7}	|
d7}
qW|	S)N�$�%rz_-�asciis'�{�}�environb�$�%�'�{�}r=rI)r.r/�string�
ascii_letters�digits�getattrrXrgr>rL�
ValueErrorri�fsdecoderh)r0rxZvarchars�quote�percentZbraceZrbraceZdollarrg�resrLZpathlen�c�var�valuer1r1r2ras�	 



"




"




"



c	Cs�t|t�r0d}d}d}d}d}nd}d}d	}d
}d}|j|�ra|S|j||�}t|�\}}|j|�r�||7}|j|�}|j|�}d
}x�|t|�kr�||s�|||kr�||=q�|||kr�|d
krN||d|krN||d|d�=|d8}q�|d
krs|j|�rs||=q�|d7}q�|d7}q�W|r�|r�|j	|�||j
|�S)Ns\r4rVs..�\\.\�\\?\r+r-r*z..�\\.\�\\?\rr=)r�r�)r�r�)r.r/rfr5r�lstriprr>�endswith�appendr)	r0rr rrZspecial_prefixes�prefix�compsrSr1r1r2r�sD	

 



)�_getfullpathnamecCsOt|�sEt|t�r*tj�}ntj�}t||�}t|�S)N)rr.r/rX�getcwdb�getcwdrr)r0�cwdr1r1r2rscCsb|r.yt|�}WqXtk
r*YqXXn*t|t�rLtj�}ntj�}t|�S)N)r�rZr.r/rXr�r�r)r0r1r1r2rs
�getwindowsversionrJrIcCs�t|t�r$d}d}d}nd}d}d}|dkrH|}|sZtd��y4tt|��}tt|��}t|�\}}t|�\}	}
t|�t|	�kr�td|	|f��d	d
�|j|�D�}dd
�|
j|�D�}d}
x@t||�D]/\}}t|�t|�krFP|
d
7}
q!W|gt	|�|
||
d�}|s�|St
|�SWn7tttt
tfk
r�tjd||��YnXdS)Ns\rVs..r+r*z..zno path specifiedz&path is on mount %r, start on mount %rcSsg|]}|r|�qSr1r1)�.0�xr1r1r2�
<listcomp>@s	zrelpath.<locals>.<listcomp>cSsg|]}|r|�qSr1r1)r�r�r1r1r2r�As	rr=r%)r.r/r|rrrrr�zipr>rr7r8rBrOrCrD)r0�startrrrZ	start_absZpath_absZstart_driveZ
start_restZ
path_driveZ	path_rest�
start_list�	path_listrSZe1Ze2�rel_listr1r1r2r%&sB	%cs(|std��t|dt�r:d�d�d�nd�d�d�y���fd	d
�|D�}�fdd
�|D�}y&t�fdd
�|D��\}Wn!tk
r�td�d�YnXttdd
�|D���dkr�td��t|dj����\}}|j��}�fdd
�|D�}�fdd
�|D�}t|�}t	|�}xQt
|�D]-\}	}
|
||	kr�|d|	�}Pq�W|dt|��}|r�|�n|}|�j|�SWn+tt
fk
r#tjd|��YnXdS)Nz%commonpath() arg is an empty sequencers\r4rVr+r-r*cs.g|]$}t|j���j���qSr1)rr5r6)r�rH)r rr1r2r�ls	zcommonpath.<locals>.<listcomp>cs%g|]\}}|j���qSr1)r)r�rRrH)rr1r2r�ms	c3s+|]!\}}|dd��kVqdS)Nr=r1)r�rRrH)rr1r2�	<genexpr>pszcommonpath.<locals>.<genexpr>z%Can't mix absolute and relative pathscss|]\}}|VqdS)Nr1)r�rRrHr1r1r2r�wsr=zPaths don't have the same drivecs(g|]}|r|�kr|�qSr1r1)r�r�)rr1r2r�|s	cs)g|]}�fdd�|D��qS)cs(g|]}|r|�kr|�qSr1r1)r�r�)rr1r2r�~s	z)commonpath.<locals>.<listcomp>.<listcomp>r1)r�r<)rr1r2r�~s	r))r|r.r/�setr>rr5r�min�max�	enumeraterr7r8rCrD)rEZdrivesplits�split_pathsrrPr0�common�s1�s2rSr�r�r1)r rrr2r)\sD	&
%"�)�_getfinalpathnamecCstt|��S)N)rr)�fr1r1r2r��sr�)�_isdir)r�r)/rX�sysr[rC�__all__rrr!rrr r�builtin_module_namesr"r3rrrrrrrrW�__doc__r	r
rr�ntr_�ImportErrorrrrrr�rr#�hasattrr�r$r%r)r�r8r�rr1r1r1r2�<module>s|

.3
1p2
64



?>