ž ¦ÿfÕOc%@sdZddlZddlZddlZddlZddlTdddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(g%Zd)Zd*Zd)Zd+Z d,Z d-Z d.Z d/ej kr÷d0Z nd1ej krd-Z nd2Zd3d4„Zd5d6„Zd7d8„Zd9d:„Zd;d<„Zd=d>„Zd?d@„ZdAd„ZdBd„ZdCd„ZdDd„ZdEd„ZdFd„ZdGd „Zejje_dHd „ZdId „ZdJd„Z dKd„Z!dLd„Z"dMd„Z#dNd„Z$dOd„Z%yddPl&m'Z'Wne(k r`dQd„Z)Yn XdRd„Z)e)Z*e+edSƒo•ej,ƒdTdUkZ-edVd&„Z.y9ej,ƒddU…dakrÙddXl&m/Z/ne(‚Wn$e0e(fk rdYdZ„Z/YnXd[d'„Z1ydd\l&m2Z2Wne(k rGd]d^„Z2YnXd_d(„Z3ydd`l&m4Z5Wne(k r|YnXdS(buCommon pathname manipulations, WindowsNT/95 version. Instead of importing this module directly, import os and refer to this module as os.path. iN(u*unormcaseuisabsujoinu splitdriveusplitusplitextubasenameudirnameu commonprefixugetsizeugetmtimeugetatimeugetctimeuislinkuexistsulexistsuisdiruisfileuismountu expanduseru expandvarsunormpathuabspathusplituncucurdirupardirusepupathsepudefpathualtsepuextsepudevnullurealpathusupports_unicode_filenamesurelpathusamefileu sameopenfileu.u..u\u;u/u.;C:\binuceu\Windowsuos2unulcCst|tƒrdSdSdS(Nsu(u isinstanceubytes(upath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu _get_empty&su _get_emptycCst|tƒrdSdSdS(Ns\u\(u isinstanceubytes(upath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu_get_sep,su_get_sepcCst|tƒrdSdSdS(Ns/u/(u isinstanceubytes(upath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu _get_altsep2su _get_altsepcCst|tƒrdSdSdS(Ns\/u\/(u isinstanceubytes(upath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu _get_bothseps8su _get_bothsepscCst|tƒrdSdSdS(Ns.u.(u isinstanceubytes(upath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu_get_dot>su_get_dotcCst|tƒrdSdSdS(Ns:u:(u isinstanceubytes(upath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu _get_colonDsu _get_coloncCst|tƒrdSdSdS(Ns\\.\s\\?\u\\.\u\\?\(s\\.\s\\?\(u\\.\u\\?\(u isinstanceubytes(upath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu _get_specialJsu _get_specialcCsUt|ttfƒs3tdj|jjƒƒ‚n|jt|ƒt |ƒƒj ƒS(uaNormalize case of pathname. Makes all characters lowercase and all slashes into backslashes.u2normcase() argument must be str or bytes, not '{}'( u isinstanceubytesustru TypeErroruformatu __class__u__name__ureplaceu _get_altsepu_get_sepulower(us((u+/opt/alt/python33/lib64/python3.3/ntpath.pyunormcaseTs cCs<t|ƒd}t|ƒdko;|dd…t|ƒkS(uTest whether a path is absoluteiiN(u splitdriveulenu _get_bothseps(us((u+/opt/alt/python33/lib64/python3.3/ntpath.pyuisabsdsc GsIt|ƒ}t|ƒ}t|ƒ}t|ƒ\}}xÊ|D]Â}t|ƒ\}} | r| d|kr|sx| r|}n| }q=nE|rÒ||krÒ|jƒ|jƒkrÉ|}| }q=n|}n|rõ|d|krõ||}n|| }q=W|rA|d|krA|rA|dd…|krA|||S||S(Niiiÿÿÿÿiÿÿÿÿ(u_get_sepu _get_bothsepsu _get_colonu splitdriveulower( upathupathsusepusepsucolonu result_driveu result_pathupup_driveup_path((u+/opt/alt/python33/lib64/python3.3/ntpath.pyujoinks0         cCsJt|ƒ}t|ƒdkr@t|ƒ}|jt|ƒ|ƒ}|dd…|dkr|dd…|kr|j|dƒ}|dkrš||fS|j||dƒ}||dkrÊ||fS|dkråt|ƒ}n|d|…||d…fS|dd…t|ƒkr@|dd…|dd…fSn||fS(uÚ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. iiiiNiÿÿÿÿiÿÿÿÿ(u _get_emptyulenu_get_sepureplaceu _get_altsepufindu _get_colon(upuemptyusepunormpuindexuindex2((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu splitdriveŽs"  0    !cCsaddl}|jdtdƒt|ƒ\}}t|ƒdkrW|dd…|fS||fS(u¢Deprecated 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 an UNC part. iNu<ntpath.splitunc is deprecated, use ntpath.splitdrive insteadi(uwarningsuwarnuDeprecationWarningu splitdriveulen(upuwarningsudriveupath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyusplitunc»s   cCsÉt|ƒ}t|ƒ\}}t|ƒ}x(|rT||d|krT|d8}q-W|d|…||d…}}|}x0|r®|dd…|kr®|dd…}qW|p¸|}|||fS(u~Split a pathname. Return tuple (head, tail) where tail is everything after the final slash. Either part may be empty.iNiÿÿÿÿiÿÿÿÿ(u _get_bothsepsu splitdriveulen(upusepsuduiuheadutailuhead2((u+/opt/alt/python33/lib64/python3.3/ntpath.pyusplitÕs  ! cCs(tj|t|ƒt|ƒt|ƒƒS(N(u genericpathu _splitextu_get_sepu _get_altsepu_get_dot(up((u+/opt/alt/python33/lib64/python3.3/ntpath.pyusplitextïscCst|ƒdS(u)Returns the final component of a pathnamei(usplit(up((u+/opt/alt/python33/lib64/python3.3/ntpath.pyubasename÷scCst|ƒdS(u-Returns the directory component of a pathnamei(usplit(up((u+/opt/alt/python33/lib64/python3.3/ntpath.pyudirnameþsc CsEytj|ƒ}Wntjtfk r4dSYnXtj|jƒS(uyTest whether a path is a symbolic link. This will always return false for Windows prior to 6.0 and for OS/2. F(uosulstatuerroruAttributeErroruFalseustatuS_ISLNKust_mode(upathust((u+/opt/alt/python33/lib64/python3.3/ntpath.pyuislinks  c Cs9ytj|ƒ}Wntjtfk r4dSYnXdS(uCTest whether a path exists. Returns True for broken symbolic linksFT(uosulstatuerroru WindowsErroruFalseuTrue(upathust((u+/opt/alt/python33/lib64/python3.3/ntpath.pyulexistss  cCsOt|ƒ}t|ƒ\}}|rE|d|krE| pD||kS||kS(u?Test whether a path is a mount point (defined as root of drive)i(u _get_bothsepsu splitdrive(upathusepsurooturest((u+/opt/alt/python33/lib64/python3.3/ntpath.pyuismounts  cCsqt|tƒrd}nd}|j|ƒs1|Sdt|ƒ}}x0||krv||t|ƒkrv|d7}qGWdtjkr–tjd}ntdtjkrµtjd}nUdtjkrÈ|Sytjd}Wntk ród}YnXt|tjdƒ}t|tƒr1|j t j ƒƒ}n|dkr_tt |ƒ|d|…ƒ}n|||d …S( uLExpand ~ and ~user constructs. If user or $HOME is unknown, do nothing.s~u~iuHOMEu USERPROFILEuHOMEPATHu HOMEDRIVEuN( u isinstanceubytesu startswithulenu _get_bothsepsuosuenvironuKeyErrorujoinuencodeusysugetfilesystemencodingudirname(upathutildeuiunuuserhomeudrive((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu expanduser/s0 %   "cCsut|tƒrtdƒ|kr7tdƒ|kr7|Sddl}t|j|jddƒ}d}d}d }d }ttd dƒ}n]d|kr©d|kr©|Sddl}|j|jd}d }d}d }d}tj }|dd…}d} t |ƒ} xb| | krp|| | d…} | |kr¶|| dd…}t |ƒ} y/|j | ƒ} || |d| d…7}Wqct k r²||7}| d} YqcXn­| |krÓ|| d| d…|kr÷|| 7}| d7} qc|| dd…}t |ƒ} y|j |ƒ} Wn*t k rV|||7}| d} YqcX|d| …} y<|dkr˜tj tj tj| ƒƒ} n || } Wn tk rÅ|| |} YnX|| 7}n| |krY|| d| d…|kr|| 7}| d7} qc|| d| d…|kro|| dd…}t |ƒ} y4t|tƒrv|j dƒ} n|j dƒ} WnJt k rÒt|tƒr¶|d|7}n|d|7}| d} YqVX|d| …} y<|dkrtj tj tj| ƒƒ} n || } Wn@tk rat|tƒrOd| d} nd| d} YnX|| 7}qc|dd…} | d7} || | d…} x>| rÝ| |krÝ| | 7} | d7} || | d…} q Wy<|dkrtj tj tj| ƒƒ} n || } Wntk r8|| } YnX|| 7}| rc| d8} qcn || 7}| d7} qW|S(ufExpand shell variables of the forms $var, ${var} and %var%. Unknown variables are left unchanged.u$u%iNu_-uasciis's%s{s$uenvironbu'u{iis}u}s${u${(u isinstanceubytesuordustringu ascii_lettersudigitsugetattruosuNoneuenvironulenuindexu ValueErrorufsencodeufsdecodeuKeyError(upathustringuvarcharsuquoteupercentubraceudollaruenvironuresuindexupathlenucuvaruvalue((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu expandvars`sÂ$               "        "      "   cCs²t|ƒ}t|ƒd}t|ƒ}|j|ƒr;|S|jt|ƒ|ƒ}t|ƒ\}}|j|ƒr||7}|j|ƒ}n|j|ƒ}d}xÕ|t |ƒkr||| sÛ||t|ƒkrå||=q¨|||kro|dkr7||d|kr7||d|d…=|d8}qy|dkrb|j t|ƒƒrb||=qy|d7}q¨|d7}q¨W| r¡| r¡|j t|ƒƒn||j |ƒS(u0Normalize path, eliminating double slashes, etc.iii( u_get_sepu_get_dotu _get_specialu startswithureplaceu _get_altsepu splitdriveulstripusplitulenuendswithuappendujoin(upathusepudotdotuspecial_prefixesuprefixucompsui((u+/opt/alt/python33/lib64/python3.3/ntpath.pyunormpath×s4   !   !  (u_getfullpathnamecCsRt|ƒsHt|tƒr*tjƒ}n tjƒ}t||ƒ}nt|ƒS(u&Return the absolute version of a path.(uisabsu isinstanceubytesuosugetcwdbugetcwdujoinunormpath(upathucwd((u+/opt/alt/python33/lib64/python3.3/ntpath.pyuabspaths   c Csb|r.yt|ƒ}WqXtk r*YqXXn*t|tƒrLtjƒ}n tjƒ}t|ƒS(u&Return the absolute version of a path.(u_getfullpathnameu WindowsErroru isinstanceubytesuosugetcwdbugetcwdunormpath(upath((u+/opt/alt/python33/lib64/python3.3/ntpath.pyuabspaths  ugetwindowsversioniicCsžt|ƒ}|tkr't|ƒ}n|s<tdƒ‚ntt|ƒƒ}tt|ƒƒ}t|ƒ\}}t|ƒ\}}t|ƒt|ƒkr½dj||ƒ} t| ƒ‚ndd„|j |ƒDƒ} dd„|j |ƒDƒ} d} xCt | | ƒD]2\} }t| ƒt|ƒkr3Pn| d7} q Wt |t ƒrYd}nd }|gt | ƒ| | | d …}|s”t|ƒSt|ŒS( u#Return a relative version of a pathuno path specifiedu,path is on mount '{0}', start on mount '{1}'cSsg|]}|r|‘qS(((u.0ux((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu 6s urelpath..cSsg|]}|r|‘qS(((u.0ux((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu 7s iis..u..N(u_get_sepucurdiru_get_dotu ValueErroruabspathunormpathu splitdriveunormcaseuformatusplituzipu isinstanceubytesulenujoin(upathustartusepu start_absupath_absu start_driveu start_restu path_driveu path_restuerroru start_listu path_listuiue1ue2upardirurel_list((u+/opt/alt/python33/lib64/python3.3/ntpath.pyurelpath#s6    % i(u_getfinalpathnamecCstt|ƒƒS(N(unormcaseuabspath(uf((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu_getfinalpathnameVsu_getfinalpathnamecCst|ƒt|ƒkS(u9Test whether two pathnames reference the same actual file(u_getfinalpathname(uf1uf2((u+/opt/alt/python33/lib64/python3.3/ntpath.pyusamefileYs(u_getfileinformationcCs|S(N((ufd((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu_getfileinformationcsu_getfileinformationcCst|ƒt|ƒkS(u5Test whether two file objects reference the same file(u_getfileinformation(uf1uf2((u+/opt/alt/python33/lib64/python3.3/ntpath.pyu sameopenfilefs(u_isdir(ii(6u__doc__uosusysustatu genericpathu__all__ucurdirupardiruextsepusepupathsepualtsepudefpathubuiltin_module_namesudevnullu _get_emptyu_get_sepu _get_altsepu _get_bothsepsu_get_dotu _get_colonu _get_specialunormcaseuisabsujoinu splitdriveusplituncusplitusplitextu _splitextubasenameudirnameuislinkulexistsuismountu expanduseru expandvarsunormpathuntu_getfullpathnameu ImportErroruabspathurealpathuhasattrugetwindowsversionusupports_unicode_filenamesurelpathu_getfinalpathnameuAttributeErrorusamefileu_getfileinformationu sameopenfileu_isdiruisdir(((u+/opt/alt/python33/lib64/python3.3/ntpath.pyus                 # -       1 w )  '