Critics have remarked that those four worthies were truly peerless throughout the ages; yet the present falls short of the pastβ€”the ancients favored unadorned simplicity, whereas the moderns prefer refined elegance. Styles of substance and ornament rise and fall in succession, shifting with the changing mores of the times; such evolution is simply the natural order of things. The ideal lies in honoring antiquity without clashing with the present, and embracing modernity without succumbing to its flawsβ€”embodying that perfect balance of substance and refinement that defines the true gentleman. There is surely no need to abandon a carved palace in favor of a cave dwelling, or to trade a jade carriage for a primitive cart with solid wooden wheels.🌌 SpectraShell

🌌 SpectraShell

Current path: lib64/python2.7/



⬆️ Go up: /lib64

πŸ“„ Viewing: ntpath.pyc

οΏ½
zfc$@spdZddlZddlZddlZddlZddlZddlTddlmZddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(g$Zd)Zd*Z	d)Z
d+Zd,Zd-Z
d.Zd/ejkrd0Znd1ejkr(d-Z
nd2Zd3οΏ½Zd4οΏ½Zd5οΏ½Zd6οΏ½Zd7οΏ½Zd8οΏ½Zd9οΏ½Zejje_d:οΏ½Zd;οΏ½Zd<οΏ½ZeZd=οΏ½Zd>οΏ½Zd?οΏ½Z d@οΏ½Z!dAοΏ½Z"yddBl#m$Z$Wne%k
rοΏ½dCοΏ½Z&n
XdDοΏ½Z&e&Z'e(edEοΏ½o,ej)οΏ½dFdGkZ*dHοΏ½Z+edIοΏ½Z,yddJl#m-Z.Wne%k
rknXdS(KsοΏ½Common pathname manipulations, WindowsNT/95 version.

Instead of importing this module directly, import os and refer to this
module as os.path.
iοΏ½οΏ½οΏ½οΏ½N(t*(t_unicodetnormcasetisabstjoint
splitdrivetsplittsplitexttbasenametdirnametcommonprefixtgetsizetgetmtimetgetatimetgetctimetislinktexiststlexiststisdirtisfiletismounttwalkt
expandusert
expandvarstnormpathtabspathtsplitunctcurdirtpardirtseptpathseptdefpathtaltseptextseptdevnulltrealpathtsupports_unicode_filenamestrelpatht.s..s\t;t/s.;C:\bintces\Windowstos2tnulcCs|jddοΏ½jοΏ½S(saNormalize case of pathname.

    Makes all characters lowercase and all slashes into backslashes.R(s\(treplacetlower(ts((s/usr/lib64/python2.7/ntpath.pyR+scCs*t|οΏ½d}|dko)|d dkS(sTest whether a path is absoluteits/\(R(R.((s/usr/lib64/python2.7/ntpath.pyR8scGst|οΏ½\}}xοΏ½|D]οΏ½}t|οΏ½\}}|ri|ddkri|sT|r]|}n|}qnE|rοΏ½||krοΏ½|jοΏ½|jοΏ½krοΏ½|}|}qn|}n|rοΏ½|ddkrοΏ½|d}n||}qW|r|ddkr|r|ddkr|t|S||S(s>Join two or more pathname components, inserting "\" as needed.is\/iοΏ½οΏ½οΏ½οΏ½s\t:(RR-R(tpathtpathstresult_drivetresult_pathtptp_drivetp_path((s/usr/lib64/python2.7/ntpath.pyR?s*

		
cCst|οΏ½dkrοΏ½|jttοΏ½}|dd!tdkrοΏ½|dd!tkrοΏ½|jtdοΏ½}|dkrvd|fS|jt|dοΏ½}||dkrοΏ½d|fS|dkrοΏ½t|οΏ½}n|| ||fS|ddkrοΏ½|d |dfSnd|fS(sοΏ½Split 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.

    iiiiiοΏ½οΏ½οΏ½οΏ½R/R0(tlenR,R Rtfind(R5tnormptindextindex2((s/usr/lib64/python2.7/ntpath.pyR`s*

cCsοΏ½|dd!dkrd|fS|dd!}|dksB|dkrοΏ½|jdd	οΏ½}|jd	dοΏ½}|dkr|d|fS|jd	|dοΏ½}||dkrοΏ½d|fS|d
krοΏ½t|οΏ½}n|| ||fSd|fS(s?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.
    iiR0R/is//s\\s\R(iοΏ½οΏ½οΏ½οΏ½(R,R9R8(R5tfirstTwoR:R;R<((s/usr/lib64/python2.7/ntpath.pyRοΏ½s



cCsοΏ½t|οΏ½\}}t|οΏ½}x(|rH||ddkrH|d}q!W|| ||}}|}x$|rοΏ½|ddkrοΏ½|d }qgW|pοΏ½|}|||fS(s~Split a pathname.

    Return tuple (head, tail) where tail is everything after the final slash.
    Either part may be empty.is/\iοΏ½οΏ½οΏ½οΏ½(RR8(R5tdtitheadttailthead2((s/usr/lib64/python2.7/ntpath.pyRοΏ½scCstj|tttοΏ½S(N(tgenericpatht	_splitextRR R!(R5((s/usr/lib64/python2.7/ntpath.pyRοΏ½scCst|οΏ½dS(s)Returns the final component of a pathnamei(R(R5((s/usr/lib64/python2.7/ntpath.pyRοΏ½scCst|οΏ½dS(s-Returns the directory component of a pathnamei(R(R5((s/usr/lib64/python2.7/ntpath.pyR	οΏ½scCstS(sNTest for symbolic link.
    On WindowsNT/95 and OS/2 always returns false
    (tFalse(R1((s/usr/lib64/python2.7/ntpath.pyRοΏ½scCsRt|οΏ½\}}|r"|dkSt|οΏ½d}t|οΏ½dkoQ|ddkS(s?Test whether a path is a mount point (defined as root of drive)R/R(s\iis/\(R/R(s\(RRR8(R1tunctrestR5((s/usr/lib64/python2.7/ntpath.pyRοΏ½s

cCsοΏ½tjdddοΏ½ytj|οΏ½}Wntjk
r=dSX||||οΏ½x<|D]4}t||οΏ½}t|οΏ½rUt|||οΏ½qUqUWdS(sIDirectory tree walk with callback function.

    For each directory in the directory tree rooted at top (including top
    itself, but excluding '.' and '..'), call func(arg, dirname, fnames).
    dirname is the name of the directory, and fnames a list of the names of
    the files and subdirectories in dirname (excluding '.' and '..').  func
    may modify the fnames list in-place (e.g. via del or slice assignment),
    and walk will only recurse into the subdirectories whose names remain in
    fnames; this can be used to implement a filter, or to impose a specific
    order of visiting.  No semantics are defined for, or required of, arg,
    beyond that arg is always passed to func.  It can be used, e.g., to pass
    a filename pattern, or a mutable object designed to accumulate
    statistics.  Passing None for arg is common.s4In 3.x, os.path.walk is removed in favor of os.walk.t
stackleveliN(twarningstwarnpy3ktostlistdirterrorRRR(ttoptfunctargtnamestname((s/usr/lib64/python2.7/ntpath.pyRοΏ½s
cCs|d dkr|Sdt|οΏ½}}x*||krS||dkrS|d}q*Wdtjkrstjd}nsdtjkrοΏ½tjd}nTdtjkrοΏ½|Sytjd}Wntk
rοΏ½d}nXt|tjdοΏ½}|dkrtt|οΏ½|d|!οΏ½}n|||S(	sLExpand ~ and ~user constructs.

    If user or $HOME is unknown, do nothing.it~s/\tHOMEtUSERPROFILEtHOMEPATHt	HOMEDRIVER/(R8RKtenvirontKeyErrorRR	(R1R?tntuserhometdrive((s/usr/lib64/python2.7/ntpath.pyRs&

c	sοΏ½d|krd|kr|Sddl}|j|jd}t|tοΏ½ritjοΏ½οΏ½οΏ½fdοΏ½}n	dοΏ½}d}d	}t|οΏ½}x:||krοΏ½||}|d
kr!||d}t|οΏ½}y)|jd
οΏ½}|d
||d }WqοΏ½t	k
r|||}|d}qοΏ½XnοΏ½|dkrοΏ½||d|d!dkr_||}|d}qοΏ½||d}t|οΏ½}y|jdοΏ½}Wn)t	k
rοΏ½|d|}|d}qοΏ½X|| }y|||οΏ½}WqοΏ½t
k
rοΏ½|d|d}qοΏ½XnοΏ½|dkrοΏ½||d|d!dkr=||}|d}qοΏ½||d|d!d
krοΏ½||d}t|οΏ½}yW|jdοΏ½}|| }y|||οΏ½}Wn#t
k
rοΏ½|d|d}nXWqοΏ½t	k
rοΏ½|d|}|d}qοΏ½XqοΏ½d}|d}|||d!}xA|dkr\||kr\||}|d}|||d!}qWy|||οΏ½}Wnt
k
rοΏ½|d|}nX|dkrοΏ½|d}qοΏ½n
||}|d}qοΏ½W|S(sfExpand shell variables of the forms $var, ${var} and %var%.

    Unknown variables are left unchanged.t$t%iοΏ½οΏ½οΏ½οΏ½Ns_-cstj|jοΏ½οΏ½jοΏ½οΏ½S(N(RKRXtencodetdecode(tvar(tencoding(s/usr/lib64/python2.7/ntpath.pytgetenvQscSstj|S(N(RKRX(Ra((s/usr/lib64/python2.7/ntpath.pyRcTsR/is'iit{t}s${(tstringt
ascii_letterstdigitst
isinstanceRtsystgetfilesystemencodingR8R;t
ValueErrorRY(	R1RftvarcharsRctresR;tpathlentcRa((Rbs/usr/lib64/python2.7/ntpath.pyRGsοΏ½	
















cCsοΏ½t|tοΏ½rdnd
\}}|jdοΏ½r4|S|jddοΏ½}t|οΏ½\}}|dkrοΏ½xV|d	 dkrοΏ½||}|d	}qgWn+|jdοΏ½rοΏ½||}|jdοΏ½}n|jdοΏ½}d
}xοΏ½|t|οΏ½krοΏ½||dkr||=qοΏ½||dkrοΏ½|d
krP||d	dkrP||d	|d	5|d	8}qοΏ½|d
kru|jdοΏ½ru||=qοΏ½|d	7}qοΏ½|d	7}qοΏ½W|rοΏ½|rοΏ½|j	|οΏ½n||j
|οΏ½S(s0Normalize path, eliminating double slashes, etc.u\u.s\R&s\\.\s\\?\R(R/iis..(u\u.(s\R&(s\\.\s\\?\(R&R/(RiRt
startswithR,RtlstripRR8tendswithtappendR(R1t	backslashtdottprefixtcompsR?((s/usr/lib64/python2.7/ntpath.pyRοΏ½s8!



 


(t_getfullpathnamecCsRt|οΏ½sHt|tοΏ½r*tjοΏ½}ntjοΏ½}t||οΏ½}nt|οΏ½S(s&Return the absolute version of a path.(RRiRRKtgetcwdutgetcwdRR(R1tcwd((s/usr/lib64/python2.7/ntpath.pyRοΏ½scCsa|r-yt|οΏ½}WqWtk
r)qWXn*t|tοΏ½rKtjοΏ½}ntjοΏ½}t|οΏ½S(s&Return the absolute version of a path.(RytWindowsErrorRiRRKRzR{R(R1((s/usr/lib64/python2.7/ntpath.pyRοΏ½s
tgetwindowsversioniicCsztt|οΏ½οΏ½}t|οΏ½\}}t|οΏ½}|sKt|οΏ½\}}n||g|jtοΏ½D]}|ra|^qafS(N(RRRtboolRRR(R1tabsRwRGtis_unctx((s/usr/lib64/python2.7/ntpath.pyt_abspath_splitοΏ½scCs1|stdοΏ½οΏ½nt|οΏ½\}}}t|οΏ½\}}}||Arbtd||fοΏ½οΏ½n|jοΏ½|jοΏ½krοΏ½|rοΏ½td||fοΏ½οΏ½qοΏ½td||fοΏ½οΏ½nd}xCt||οΏ½D]2\}	}
|	jοΏ½|
jοΏ½krοΏ½Pn|d7}qοΏ½Wtgt|οΏ½|||}|s'tSt|οΏ½S(s#Return a relative version of a pathsno path specifieds,Cannot mix UNC and non-UNC paths (%s and %s)s,path is on UNC root %s, start on UNC root %ss&path is on drive %s, start on drive %sii(RlRοΏ½R-tzipRR8RR(R1tstarttstart_is_unctstart_prefixt
start_listtpath_is_unctpath_prefixt	path_listR?te1te2trel_list((s/usr/lib64/python2.7/ntpath.pyR%οΏ½s,
(t_isdir(/t__doc__RKRjtstatRCRIRt__all__RRR!RRR Rtbuiltin_module_namesR"RRRRRRRRDRR	RRRRRRRRtntRytImportErrorRR#thasattrR~R$RοΏ½R%RοΏ½R(((s/usr/lib64/python2.7/ntpath.pyt<module>sp
			
		!	*	$							$	*	X	5

		



πŸ“