MINI MINI MANI MO

Path : /lib64/python3.6/__pycache__/
File Upload :
Current File : //lib64/python3.6/__pycache__/ntpath.cpython-36.opt-1.pyc

3


 \6Z'@s>dZdZdZdZdZdZdZdZdZdd	l	Z	dd	l
Z
dd	lZdd	lZdd
lTddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1g'Z
d2d3Zd4dZd5dZd6d
Zd7dZd8d"Zd9dZd:dZejje_d;dZd<dZd=dZd>dZydd?lmZWnek
r2d	ZYnXd@dZdAdZdBdZ dCd Z!dDdEZ"yddFlm#Z#Wnek
re"Z$Yn
XdGd!Z$e$Z%e&e
dHoe
j'dIdJkZ(dRdKd-Z)dLd1Z*y,e
j'd	dJdSkrddNlm+Z+neWn"e,efk
rdOdPZ+YnXyddQlm-Z.Wnek
r8YnXd	S)TzCommon pathname manipulations, WindowsNT/95 version.

Instead of importing this module directly, import os and refer to this
module as os.path.
.z..\;/z.;C:\binZnulN)*normcaseisabsjoin
splitdrivesplitsplitextbasenamedirnamecommonprefixgetsizegetmtimegetatimegetctimeislinkexistslexistsisdirisfileismount
expanduser
expandvarsnormpathabspathsplitunccurdirpardirseppathsepdefpathaltsepextsepdevnullrealpathsupports_unicode_filenamesrelpathsamefilesameopenfilesamestat
commonpathcCst|trdSdSdS)Ns\/z\/)
isinstancebytes)pathr1/usr/lib64/python3.6/ntpath.py
_get_bothseps"s
r3cCsxtj|}y.t|tr&|jddjS|jddjSWn:ttfk
rrt|ttfsltd|j	j
dYnXdS)zaNormalize case of pathname.

    Makes all characters lowercase and all slashes into backslashes./\rrz0normcase() argument must be str or bytes, not %rN)osfspathr.r/replacelower	TypeErrorAttributeErrorstr	__class____name__)sr1r1r2r,s

cCs2tj|}t|d}t|dko0|dt|kS)zTest whether a path is absoluter)r6r7r
lenr3)r?r1r1r2rCs
c

GsVtj|}t|tr"d}d}d}nd}d}d}y|sD|dd|t|\}}xttj|D]}t|\}}	|	r|	d|kr|s|r|}|	}q^n*|r||kr|j|jkr|}|	}q^|}|r|d
|kr||}||	}q^W|r|d|kr|r|dd|kr|||S||Sttt	fk
rPt
jd	|f|YnXdS)Nr5s\/:rz\/:rr@r	rD)r6r7r.r/r
mapr9r:r;BytesWarninggenericpath_check_arg_types)
r0pathsr!sepscolonZresult_driveZresult_pathpZp_driveZp_pathr1r1r2r	KsF


cCstj|}t|dkrt|tr0d}d}d}nd}d}d}|j||}|dd|dkr|dd	|kr|j|d}|dkr|dd|fS|j||d
}||d
kr|dd|fS|d
krt|}|d|||dfS|d
d|kr|dd|ddfS|dd|fS)aSplit a pathname into drive/UNC sharepoint and relative path specifiers.
    Returns a 2-tuple (drive_or_unc, path); either part may be empty.

    If you assign
        result = splitdrive(p)
    It is always true that:
        result[0] + result[1] == p

    If the path contained a drive letter, drive_or_unc will contain everything
    up to and including the colon.  e.g. splitdrive("c:/dir") returns ("c:", "/dir")

    If the path contained a UNC path, the drive_or_unc will contain the host name
    and share up to but not including the fourth directory separator character.
    e.g. splitdrive("//host/computer/dir") returns ("//host/computer", "/dir")

    Paths cannot contain both a drive letter and a UNC path.

    r5r4rBrrrCrr@NrDrD)r6r7rAr.r/r8find)rLr!r$rKZnormpindexZindex2r1r1r2r
zs.

$cCsFddl}|jdtdt|\}}t|dkr>|dd|fS||fS)aDeprecated since Python 3.1.  Please use splitdrive() instead;
    it now handles UNC paths.

    Split a pathname into UNC mount point and relative path specifiers.

    Return a 2-tuple (unc, rest); either part may be empty.
    If unc is not empty, it has the form '//host/mount' (or similar
    using backslashes).  unc+rest is always the input path.
    Paths containing drive letters never have a UNC part.
    rNz<ntpath.splitunc is deprecated, use ntpath.splitdrive insteadrM)warningswarnDeprecationWarningr
rA)rLrQdriver0r1r1r2rscCs|tj|}t|}t|\}}t|}x |rF||d|krF|d8}q(W|d|||d}}|j|pn|}|||fS)z~Split a pathname.

    Return tuple (head, tail) where tail is everything after the final slash.
    Either part may be empty.r@N)r6r7r3r
rArstrip)rLrJdiheadtailr1r1r2rs
cCs8tj|}t|tr$tj|dddStj|dddSdS)Nr5r4.rrr)r6r7r.r/rG	_splitext)rLr1r1r2rs

cCst|dS)z)Returns the final component of a pathnamer@)r)rLr1r1r2r
scCst|dS)z-Returns the directory component of a pathnamer)r)rLr1r1r2rscCs4ytj|}Wnttfk
r&dSXtj|jS)zhTest whether a path is a symbolic link.
    This will always return false for Windows prior to 6.0.
    F)r6lstatOSErrorr;statS_ISLNKst_mode)r0str1r1r2rs
cCs(ytj|}Wntk
r"dSXdS)zCTest whether a path exists.  Returns True for broken symbolic linksFT)r6r\r])r0rar1r1r2rs
)_getvolumepathnamecCsttj|}t|}t|}t|\}}|rD|d|krD|pB||kS||krPdStrl|j|t|j|kSdSdS)zaTest whether a path is a mount point (a drive root, the root of a
    share, or a mounted volume)rTFN)r6r7r3rr
rbrU)r0rJrootrestr1r1r2rs
c
Cstj|}t|trd}nd}|j|s,|Sdt|}}x$||kr^||t|kr^|d7}q<Wdtjkrvtjd}n\dtjkrtjd}nFdtjkr|Sytjd}Wntk
rd}YnXt	|tjd}t|trtj
|}|dkrt	t||d|}|||d	S)
zLExpand ~ and ~user constructs.

    If user or $HOME is unknown, do nothing.~~r@HOMEZUSERPROFILEZHOMEPATHZ	HOMEDRIVEN)r6r7r.r/
startswithrAr3environKeyErrorr	fsencoder)r0tilderWnuserhomerTr1r1r2r5s2









cCs<tj|}t|trhd|kr(d|kr(|Sddl}t|j|jdd}d}d}d}d	}d}ttd
d}nFd|kr|d|kr||Sddl}|j|jd}d
}d}d}d}d}tj}|dd}	d}
t	|}xn|
|kr6||
|
d}||kr\||
dd}t	|}y&|j
|}
|	||d|
d7}	Wn*tk
rV|	||7}	|d}
YnXn||krN||
d|
d|kr|	|7}	|
d7}
n||
dd}t	|}y|j
|}
Wn*tk
r|	||7}	|d}
YnhX|d|
}
y.|dkrtjtjtj
|
}n||
}Wn"tk
r@||
|}YnX|	|7}	n||kr$||
d|
d|kr|	|7}	|
d7}
q,||
d|
d|krb||
dd}t	|}y|j
|}
Wn.tk
r|	|||7}	|d}
YnlX|d|
}
y.|dkr&tjtjtj
|
}n||
}Wn&tk
rV|||
|}YnX|	|7}	n|dd}
|
d7}
||
|
d}x6|r||kr|
|7}
|
d7}
||
|
d}qWy.|dkrtjtjtj
|
}n||
}Wntk
r
||
}YnX|	|7}	|r,|
d8}
n|	|7}	|
d7}
qW|	S)zfExpand shell variables of the forms $var, ${var} and %var%.

    Unknown variables are left unchanged.$%rNz_-ascii'{}environb$%'{}r@rM)r6r7r.r/stringZ
ascii_lettersZdigitsgetattrrjrArP
ValueErrorrlfsdecoderk)r0r|ZvarcharsZquoteZpercentZbraceZrbraceZdollarrjresrPZpathlencvarvaluer1r1r2rgs











c	Cs\tj|}t|tr*d}d}d}d}d}nd}d}d	}d
}d}|j|rL|S|j||}t|\}}|j|r||7}|j|}|j|}d
}x|t	|kr2||s|||kr||=q|||kr(|d
ko||d|kr||d|d=|d8}n&|d
kr|j
|r||=n|d7}q|d7}qW|rN|rN|j|||j|S)z0Normalize path, eliminating double slashes, etc.r5r4rZs..\\.\\\?\rrrz..\\.\\\?\rr@)rr)rr)
r6r7r.r/rir8r
lstriprrAendswithappendr	)	r0r!r$rr Zspecial_prefixesprefixcompsrWr1r1r2rsF








cCs@tj|}t|s8t|tr&tj}ntj}t||}t|S)zReturn the absolute version of a path as a fallback function in case
    `nt._getfullpathname` is not available or raises OSError. See bpo-31047 for
    more.

    )	r6r7rr.r/getcwdbgetcwdr	r)r0cwdr1r1r2_abspath_fallback	s



r)_getfullpathnamecCs.ytt|Sttfk
r(t|SXdS)z&Return the absolute version of a path.N)rrr]r~r)r0r1r1r2r!sgetwindowsversionrNrMcCsdtj|}t|tr"d}d}d}nd}d}d}|dkr:|}|sFtdtj|}ytt|}tt|}t|\}}t|\}	}
t|t|	krtd	|	|fd
d|j	|D}dd|
j	|D}d
}
x0t
||D]"\}}t|t|krP|
d7}
qW|gt||
||
d}|s(|St|St
ttttfk
r^tjd||YnXdS)z#Return a relative version of a pathr5rZs..rrz..Nzno path specifiedz&path is on mount %r, start on mount %rcSsg|]}|r|qSr1r1).0xr1r1r2
<listcomp>Jszrelpath.<locals>.<listcomp>cSsg|]}|r|qSr1r1)rrr1r1r2rKsrr@r))r6r7r.r/r~rrr
rrziprAr	r:r;rFrSrGrH)r0startr!rr Z	start_absZpath_absZstart_driveZ
start_restZ
path_driveZ	path_rest
start_list	path_listrWZe1Ze2rel_listr1r1r2r).sF


cs|stdtttj|}t|dtr8dddndddy>fd	d
|D}fdd
|D}ytfdd
|D\}Wntk
rtddYnXttdd
|Ddkrtdt	|dj
\}}|j}fdd
|D}fdd
|D}t|}t
|}xBt|D]&\}	}
|
||	kr,|d|	}Pq,W|dt|}|rt|n|}|j|Sttfk
rtjd|YnXdS)zDGiven a sequence of path names, returns the longest common sub-path.z%commonpath() arg is an empty sequencerr5r4rZrrrcs g|]}t|jjqSr1)r
r8r9)rrL)r$r!r1r2rwszcommonpath.<locals>.<listcomp>csg|]\}}|jqSr1)r)rrVrL)r!r1r2rxsc3s"|]\}}|ddkVqdS)Nr@r1)rrVrL)r!r1r2	<genexpr>{szcommonpath.<locals>.<genexpr>z%Can't mix absolute and relative pathsNcss|]\}}|VqdS)Nr1)rrVrLr1r1r2rsr@zPaths don't have the same drivecsg|]}|r|kr|qSr1r1)rr)rr1r2rscsg|]}fdd|DqS)csg|]}|r|kr|qSr1r1)rr)rr1r2rsz)commonpath.<locals>.<listcomp>.<listcomp>r1)rr?)rr1r2rsr-)r-)r~tuplerEr6r7r.r/setrAr
r8rminmax	enumerater	r:r;rGrH)rIZdrivesplitssplit_pathsrrTr0commons1s2rWrrr1)r$rr!r2r-fsF
)_getfinalpathnamecCstt|S)N)rr)fr1r1r2rsr)_isdir)N)rr)/__doc__rr r%r!r"r$r#r&r6sysr^rG__all__r3rrr	r
rrrr[r
rrrntrbImportErrorrrrrrrrr'hasattrrr(r)r-rr;rrr1r1r1r2<module>s|



/4

2q1

85

OHA YOOOO