b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/posixpath.pyo
Size10.93 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:26
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc+@sÐdZddkZddkZddkZddkZddkTdddddd d
d d d
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)g&Zd*Zd+Zd*Zd,Z d-Z
d.Z dZ
d/Zd0�Zd1�Zd2�Zd3�Zd4�Zeiie_d5�Zd6�Zd7�Zd8�Zd9�Zd:�Zd;�Zd<�Zd=�Zd>�Zd?�Zda d@�Z!dA�Z"dB�Z#dC�Z$dD�Z%e&Z'edE�Z(dS(FsçCommon operations on Posix pathnames.

Instead of importing this module directly, import os and refer to
this module as os.path. The "os.path" name is an alias for this
module on Posix systems; on other systems (e.g. Mac, Windows),
os.path provides the same operations in a manner specific to that
platform, and is an alias to another module (e.g. macpath, ntpath).

Some of this can actually be useful on non-Posix systems too, e.g.
for manipulation of the pathname component of URLs.
iÿÿÿÿN(t*tnormcasetisabstjoint
splitdrivetsplittsplitexttbasenametdirnamet commonprefixtgetsizetgetmtimetgetatimetgetctimetislinktexiststlexiststisdirtisfiletismounttwalkt
expandusert
expandvarstnormpathtabspathtsamefilet sameopenfiletsamestattcurdirtpardirtseptpathseptdefpathtaltseptextseptdevnulltrealpathtsupports_unicode_filenamestrelpatht.s..t/t:s:/bin:/usr/bins /dev/nullcCs|S(s6Normalize case of pathname. Has no effect under Posix((ts((s!/usr/lib64/python2.6/posixpath.pyR*scCs
|id�S(sTest whether a path is absoluteR((t
startswith(R*((s!/usr/lib64/python2.6/posixpath.pyR2scGsn|}xa|D]Y}|id�o
|}q
|djp|id�o||7}q
|d|7}q
W|S(s�Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded.R(t(R+tendswith(tatptpathtb((s!/usr/lib64/python2.6/posixpath.pyR;s
cCsc|id�d}|| ||}}|o*|dt|�jo|id�}n||fS(s�Split a pathname. Returns tuple "(head, tail)" where "tail" is
everything after the final slash. Either part may be empty.R(i(trfindtlentrstrip(R/titheadttail((s!/usr/lib64/python2.6/posixpath.pyROs
cCsti|ttt�S(N(t genericpatht _splitextRR!R"(R/((s!/usr/lib64/python2.6/posixpath.pyR^scCs
d|fS(sJSplit a pathname into drive and path. On Posix, drive is always
empty.R,((R/((s!/usr/lib64/python2.6/posixpath.pyRescCs|id�d}||S(s)Returns the final component of a pathnameR(i(R2(R/R5((s!/usr/lib64/python2.6/posixpath.pyRmscCsR|id�d}|| }|o*|dt|�jo|id�}n|S(s-Returns the directory component of a pathnameR(i(R2R3R4(R/R5R6((s!/usr/lib64/python2.6/posixpath.pyRus

cCsCyti|�}Wntitfj
otSXti|i�S(s&Test whether a path is a symbolic link(tostlstatterrortAttributeErrortFalsetstattS_ISLNKtst_mode(R0tst((s!/usr/lib64/python2.6/posixpath.pyR�s
cCs1yti|�}Wntij
otSXtS(sCTest whether a path exists. Returns True for broken symbolic links(R:R;R<R>tTrue(R0RB((s!/usr/lib64/python2.6/posixpath.pyR�s
cCs+ti|�}ti|�}t||�S(s9Test whether two pathnames reference the same actual file(R:R?R(tf1tf2ts1ts2((s!/usr/lib64/python2.6/posixpath.pyR�scCs+ti|�}ti|�}t||�S(s:Test whether two open file objects reference the same file(R:tfstatR(tfp1tfp2RFRG((s!/usr/lib64/python2.6/posixpath.pyR scCs#|i|ijo|i|ijS(s5Test whether two stat buffers reference the same file(tst_inotst_dev(RFRG((s!/usr/lib64/python2.6/posixpath.pyRªscCs£t|�otSy+ti|�}tit|d��}Wntij
otSX|i}|i}||jotS|i}|i}||jotStS(s$Test whether a path is a mount points..( RR>R:R;RR<RLRCRK(R0RFRGtdev1tdev2tino1tino2((s!/usr/lib64/python2.6/posixpath.pyR³s 
  
  
c CsÊtiddd�yti|�}Wntij
odSX||||�xs|D]k}t||�}yti|�}Wntij
o
qWnXti|i �ot
|||�qWqWWdS(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( twarningstwarnpy3kR:tlistdirR<RR;R?tS_ISDIRRAR(ttoptfunctargtnamestnameRB((s!/usr/lib64/python2.6/posixpath.pyRÐs  cCs|id�p|S|idd�}|djot|�}n|djoIdtijo(ddk}|iti��i}qàtid}nGddk}y|i |d|!�}Wnt
j
o|SX|i}|i d�p|}|||S(sOExpand ~ and ~user constructions. If user or $HOME is unknown,
do nothing.t~R(iitHOMEiÿÿÿÿN( R+tfindR3R:tenvirontpwdtgetpwuidtgetuidtpw_dirtgetpwnamtKeyErrorR4(R0R5R_tuserhometpwent((s!/usr/lib64/python2.6/posixpath.pyRøs$

   cCsd|jo|Stpddk}|id�and}xÎtoÆti||�}|pPn|id�\}}|id�}|id�o!|id�o|dd!}n|t i
jo9||}|| t i
|}t |�}||7}qA|}qAW|S( sZExpand shell variables of form $var and ${var}. Unknown variables
are left unchanged.t$iÿÿÿÿNs\$(\w+|\{[^}]*\})iit{t}( t_varprogtretcompileRCtsearchtspantgroupR+R-R:R^R3(R0RkR5tmtjRZR7((s!/usr/lib64/python2.6/posixpath.pyRs,
  
  cCsDt|t�od nd \}}|djo|S|id�}|o+|id�o|id� o
d}n|id�}g}x}|D]u}|d
joq�n|d jp(| o| p|o"|d
d jo|i|�q�|o|i�q�q�W|}|i|�}|o|||}n|p|S(s0Normalize path, eliminating double slashes, etc.u/u.R(R'R,s//s///is..iÿÿÿÿ(u/u.(R(R'(R,R'(t
isinstancetunicodeR+RtappendtpopR(R0tslashtdottinitial_slashestcompst new_compstcomp((s!/usr/lib64/python2.6/posixpath.pyR7s.#
!

cCsVt|�p?t|t�oti�}n
ti�}t||�}nt|�S(sReturn an absolute path.(RRrRsR:tgetcwdutgetcwdRR(R0tcwd((s!/usr/lib64/python2.6/posixpath.pyRTs 
 cCsét|�odg|id�d}ndg|id�}x�tdt|�d�D]�}t|d|!�}t|�oZt|�}|djott|g||��St|g||�}t |�Sq[q[Wt|�S(slReturn the canonical path of the specified filename, eliminating any
symbolic links encountered in the path.R(iR,iiN(
RRtrangeR3RRt
_resolve_linktNoneRR$(tfilenametbitsR5t componenttresolvedtnewpath((s!/usr/lib64/python2.6/posixpath.pyR$bs

 
cCs�g}x~t|�op||jodS|i|�ti|�}t|�p%t|�}tt||��}q t|�}q W|S(sÈInternal helper function. Takes a path and follows symlinks
until we either arrive at something that isn't a symlink, or
encounter a path we've seen before (meaning that there's a loop).
N( RR�RtR:treadlinkRRRR(R0t
paths_seenR�tdir((s!/usr/lib64/python2.6/posixpath.pyR�ys



 cCs�|ptd��nt|�it�}t|�it�}tt||g��}tgt|�|||}|ptSt|�S(s#Return a relative version of a pathsno path specified( t
ValueErrorRRRR3R RRR(R0tstartt
start_listt path_listR5trel_list((s!/usr/lib64/python2.6/posixpath.pyR&�s()t__doc__R:R?R8RRt__all__RRR"RRR R�R!R#RRRRRR9RRRRRRRRRRRRjRRRR$R�R>R%R&(((s!/usr/lib64/python2.6/posixpath.pyt<module> sZ    
       


 (