%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/__pycache__/ntpath.cpython-38.pyc

U

naVl&@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/d0g&Z
d1d2Zd3dZd4dZd5d
Zd6dZd7dZd8dZejje_d9dZd:dZd;dZd<dZzdd=lmZWnek
r(d	ZYnXd>dZd?dZd@dZdAd Z dBdCZ!zddDlm"Z"Wnek
r|e!Z#Yn
XdEd!Z#zddFlm$Z$m%Z&Wnek
re#Z'YnXdGdHZ(dIdJZ)dKd*Z'e*e
dLoe
+dMdNkZ,dRdOd,Z-dPd0Z.zddQlm/Z0Wnek
r"YnXd	S)SzCommon pathname manipulations, WindowsNT/95 version.

Instead of importing this module directly, import os and refer to this
module as os.path.
...\;/z.;C:\binZnulN)*normcaseisabsjoin
splitdrivesplitsplitextbasenamedirnamecommonprefixgetsizegetmtimegetatimegetctimeislinkexistslexistsisdirisfileismount
expanduser
expandvarsnormpathabspathcurdirpardirseppathsepdefpathaltsepextsepdevnullrealpathsupports_unicode_filenamesrelpathsamefilesameopenfilesamestat
commonpathcCst|trdSdSdS)N\/\/)
isinstancebytespathr4"/usr/local/lib/python3.8/ntpath.py
_get_bothseps"s
r6cCs8t|}t|tr$|ddS|ddSdS)zaNormalize case of pathname.

    Makes all characters lowercase and all slashes into backslashes./\rrN)osfspathr0r1replacelowersr4r4r5r,s

cCsjt|}t|tr,|dddrBdSn|dddrBdSt|d}t|d	koh|d	t|kS)
zTest whether a path is absoluter7r8\\?\Trr\\?\r)	r9r:r0r1r;
startswithrlenr6r=r4r4r5r	=s

c

GsTt|}t|tr"d}d}d}nd}d}d}z|sD|dd|t|\}}ttj|D]~}t|\}}	|	r|	d|kr|s|s|}|	}q\n*|r||kr||kr|}|	}q\|}|r|d|kr||}||	}q\|r|d|kr|r|dd|kr|||WS||WSttt	fk
rNt
jd	|f|YnXdS)
Nr8r.:rr/:rr
)r9r:r0r1rmapr<	TypeErrorAttributeErrorBytesWarninggenericpath_check_arg_types)
r3pathsr!sepscolonZresult_driveZresult_pathpZp_driveZp_pathr4r4r5r
MsL



cCst|}t|dkrt|tr0d}d}d}nd}d}d}|||}|dd|dkr|dd	|kr||d}|d
kr|dd|fS|||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.

    r8r7rDrrrErrFNrA)r9r:rCr0r1r;find)rPr!r$rOZnormpindexZindex2r4r4r5r|s.

$cCsxt|}t|}t|\}}t|}|rD||d|krD|d8}q&|d|||d}}||pj|}|||fS)z~Split a pathname.

    Return tuple (head, tail) where tail is everything after the final slash.
    Either part may be empty.rAN)r9r:r6rrCrstrip)rPrNdiheadtailr4r4r5rs

cCs8t|}t|tr$t|dddSt|dddSdS)Nr8r7.rrr)r9r:r0r1rK	_splitextrPr4r4r5r
s

cCst|dS)z)Returns the final component of a pathnamerArr\r4r4r5rscCst|dS)z-Returns the directory component of a pathnamerr]r\r4r4r5rsc
Cs8zt|}Wntttfk
r*YdSXt|jS)zhTest whether a path is a symbolic link.
    This will always return false for Windows prior to 6.0.
    F)r9lstatOSError
ValueErrorrIstatS_ISLNKst_moder3str4r4r5rs
c	Cs.zt|}Wnttfk
r(YdSXdS)zCTest whether a path exists.  Returns True for broken symbolic linksFT)r9r^r_r`rdr4r4r5rs
)_getvolumepathnamecCstt|}t|}t|}t|\}}|rD|d|krD|pB||kS||krPdStrl||t||kSdSdS)zaTest whether a path is a mount point (a drive root, the root of a
    share, or a mounted volume)rTFN)r9r:r6rrrfrU)r3rNrootrestr4r4r5rs
cCst|}t|trd}nd}||s,|Sdt|}}||kr\||t|kr\|d7}q:dtjkrrtjd}nFdtjkr|Sztjd}Wntk
rd}YnXt	|tjd}t|trt
|}|dkrt	t||d|}|||dS)	zLExpand ~ and ~user constructs.

    If user or $HOME is unknown, do nothing.~~rAZUSERPROFILEZHOMEPATHZ	HOMEDRIVEN)r9r:r0r1rBrCr6environKeyErrorr
fsencoder)r3tilderWnuserhomedriver4r4r5r!s.








cCs2t|}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	|}|
|kr.||
|
d}||krX||
dd}t	|}z&|
|}
|	||d|
d7}	Wn*tk
rR|	||7}	|d}
YnXn||krJ||
d|
d|kr|	|7}	|
d7}
n||
dd}t	|}z|
|}
Wn*tk
r|	||7}	|d}
YnhX|d|
}
z.|dkrttjt
|
}n||
}Wn"tk
r<||
|}YnX|	|7}	n||kr||
d|
d|kr|	|7}	|
d7}
q$||
d|
d|kr^||
dd}t	|}z|
|}
Wn.tk
r|	|||7}	|d}
YnlX|d|
}
z.|dkr"ttjt
|
}n||
}Wn&tk
rR|||
|}YnX|	|7}	n|dd}
|
d7}
||
|
d}|r||kr|
|7}
|
d7}
||
|
d}qz.|dkrttjt
|
}n||
}Wntk
r||
}YnX|	|7}	|r$|
d8}
n|	|7}	|
d7}
q|	S)zfExpand shell variables of the forms $var, ${var} and %var%.

    Unknown variables are left unchanged.$%rNz_-ascii'{}environb$%'{}rArQ)r9r:r0r1string
ascii_lettersdigitsgetattrrlrCrTr`rnfsdecoderm)r3rZvarcharsquotepercentZbraceZrbraceZdollarrlresrTZpathlencvarvaluer4r4r5rQs













c	CsPt|}t|tr*d}d}d}d}d}nd}d}d}d	}d
}||rL|S|||}t|\}}||r||7}||}||}d}|t	|kr,||r|||kr||=q|||kr"|dkr||d|kr||d|d=|d8}n&|dkr|
|r||=n|d7}q|d7}q|sB|sB|||||S)
z0Normalize path, eliminating double slashes, etc.r8r7rZ..)s\\.\r?rrrr)z\\.\r@rrA)
r9r:r0r1rBr;rlstriprrCendswithappendr
)	r3r!r$rr Zspecial_prefixesprefixcompsrWr4r4r5rsF









cCs@t|}t|s8t|tr&t}nt}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.

    )	r9r:r	r0r1getcwdbgetcwdr
r)r3cwdr4r4r5_abspath_fallbacks



r)_getfullpathnamec	Cs4ztt|WSttfk
r.t|YSXdS)z&Return the absolute version of a path.N)rrr_r`rr2r4r4r5rs)_getfinalpathnamereadlinkc
Csd}t}t||kr|t|z:|}t|}t|s\t|sJ|}Wqttt||}Wq
t	k
r}z|j
|krWYqW5d}~XYq
tk
rYqYq
Xq
|S)N)rArQrR 2CWi&i(i))setradd_nt_readlinkr	rrr
rr_winerrorr`)r3allowed_winerrorseenZold_pathexr4r4r5_readlink_deeps&
rcCsd}d}|rzt|}|r$t||n|WStk
r}z|j|krFz0t|}||krt|rft||n|WWYTSWntk
rYnXt|\}}|r|s||WYS|rt||n|}W5d}~XYqXq|S)N)rArQrRrrrrrr{iirk)rr
r_rrr)r3rrYrnew_pathnamer4r4r5_getfinalpathname_nonstrictCs(
 &rc	
Cs^t|}t|trBd}d}d}t}t|tttkrjdSn(d}d}d}t}t|ttkrjdS|	|}|st
|st||}zt|}d	}Wn0t
k
r}z|j}t|}W5d}~XYnX|sZ|	|rZ|	|r||t|d}n|t|d}zt||kr"|}Wn4t
k
rX}z|j|krH|}W5d}~XYnX|S)
Nr?s\\?\UNC\s\\s\\.\NULr@z\\?\UNC\z\\z\\.\NULr)rr0r1r9rrrnr&rrBr	r
rr_rrrC)	r3rZ
unc_prefixZnew_unc_prefixrZ
had_prefixZinitial_winerrorrZspathr4r4r5r'qsD



getwindowsversionrRrQcCsft|}t|tr"d}d}d}nd}d}d}|dkr:|}|sFtdt|}ztt|}tt|}t|\}}t|\}	}
t|t|	krtd	|	|fd
d|	|D}dd|
	|D}d
}
t
||D]$\}}t|t|krq|
d7}
q|gt||
||
d}|s(|WSt|WSt
ttttfk
r`td||YnXdS)z#Return a relative version of a pathr8rZrrrrNzno path specifiedz&path is on mount %r, start on mount %rcSsg|]}|r|qSr4r4.0xr4r4r5
<listcomp>szrelpath.<locals>.<listcomp>cSsg|]}|r|qSr4r4rr4r4r5rsrrAr))r9r:r0r1r`rrrrrziprCr
rHrIrJDeprecationWarningrKrL)r3startr!rr Z	start_absZpath_absZstart_driveZ
start_restZ
path_driveZ	path_rest
start_list	path_listrWZe1Ze2rel_listr4r4r5r)sJ




c	s|stdtttj|}t|dtr8dddndddz@fd	d
|D}fdd
|D}ztfdd
|D\}Wntk
rtddYnXttdd
|Ddkrtdt	|d
\}}|}fdd
|D}fdd
|D}t|}t
|}t|D]*\}	}
|
||	kr*|d|	}qfq*|dt|}|rt|n|}||WSttfk
rtjd|YnXdS)zDGiven a sequence of path names, returns the longest common sub-path.z%commonpath() arg is an empty sequencerr8r7rZrrrcs g|]}t|qSr4)rr;r<)rrP)r$r!r4r5rszcommonpath.<locals>.<listcomp>csg|]\}}|qSr4r]rrVrPr!r4r5rsc3s"|]\}}|ddkVqdS)NrAr4rrr4r5	<genexpr>szcommonpath.<locals>.<genexpr>z%Can't mix absolute and relative pathsNcss|]\}}|VqdS)Nr4rr4r4r5rsrAzPaths don't have the same drivecsg|]}|r|kr|qSr4r4rrrr4r5rscsg|]}fdd|DqS)csg|]}|r|kr|qSr4r4rrr4r5rsz)commonpath.<locals>.<listcomp>.<listcomp>r4)rr>rr4r5rsr-)r-)r`tuplerGr9r:r0r1rrCrr;rminmax	enumerater
rHrIrKrL)rMZdrivesplitssplit_pathsr	rrr3commons1s2rWrrr4)r$rr!r5r-sF

)_isdir)N)1__doc__rr r%r!r"r$r#r&r9sysrarK__all__r6rr	r
rrr
r[rrrrntrfImportErrorrrrrrrrrrrr'rrhasattrrr(r)r-rrr4r4r4r5<module>s	
/8

0q2

*.2
84

Zerion Mini Shell 1.0