ž §ÿf3c"@sndZddlZddlZddlTddlmZmZmZmZm Z m Z m Z ddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&g"Z d'Z d(Zd'Zd)Zd*Zd+Zd,Zd-Zd.d„Zd/d„Zd0d„Zd1d „Zd2d „ZeZd3d„Zd4d„Zd5d„ZeZd6Z!dS(7uŒCommon pathname manipulations, OS/2 EMX version. Instead of importing this module directly, import os and refer to this module as os.path. iN(u*(u expanduseru expandvarsuisabsuislinku splitdriveusplitextusplitunormcaseuisabsujoinu splitdriveusplitusplitextubasenameudirnameu commonprefixugetsizeugetmtimeugetatimeugetctimeuislinkuexistsulexistsuisdiruisfileuismountu expanduseru expandvarsunormpathuabspathusplituncucurdirupardirusepupathsepudefpathualtsepuextsepudevnullurealpathusupports_unicode_filenamesu.u..u/u\u;u.;C:\binunulcCsIt|ttfƒs3tdj|jjƒƒ‚n|jddƒjƒS(uZNormalize case of pathname. Makes all characters lowercase and all altseps into seps.u2normcase() argument must be str or bytes, not '{}'u\u/( u isinstanceubytesustru TypeErroruformatu __class__u__name__ureplaceulower(us((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyunormcase#s cGsm|}x`|D]X}t|ƒr(|}q |dksJ|dd…dkrW||}q |d|}q W|S(u=Join two or more pathname components, inserting sep as neededuiNu/\:u/iÿÿÿÿ(uisabs(uaupupathub((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyujoin/s   " cCsÕ|dd…dkr d|fS|dd…}|d ksH|d krËt|ƒ}|jddƒ}|d kr|d|fS|jd|dƒ}|d kr­t|ƒ}n|d|…||d…fSd|fS( u@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. iiu:uiu/u\Nu//u\\iÿÿÿÿiÿÿÿÿ(unormcaseufindulen(upufirstTwounormpuindex((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyusplitunc=s     cCst|ƒdS(u)Returns the final component of a pathnamei(usplit(up((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyubasename[scCst|ƒdS(u-Returns the directory component of a pathnamei(usplit(up((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyudirnamebscCsRt|ƒ\}}|r"|dkSt|ƒd}t|ƒdkoQ|ddkS(u?Test whether a path is a mount point (defined as root of drive)uu/u\iiu/\(uu/u\(usplituncu splitdriveulen(upathuuncurestup((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyuismountps  cCsh|jddƒ}t|ƒ\}}x4|dd…dkrZ|d}|dd…}q'W|jdƒ}d}xÆ|t|ƒkr8||dkrŸ||=qs||dkrñ|dkrñ||dd krñ||d|d…=|d}qs||dkr+|dkr+||ddkr+||=qs|d}qsW| rW| rW|jdƒn|dj|ƒS( u0Normalize path, eliminating double slashes, etc.u\u/Niiu.u..u(uu..(ureplaceu splitdriveusplitulenuappendujoin(upathuprefixucompsui((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyunormpath{s&  0 0 cCs.t|ƒs$ttjƒ|ƒ}nt|ƒS(u%Return the absolute version of a path(uisabsujoinuosugetcwdunormpath(upath((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyuabspath•s F("u__doc__uosustatu genericpathuntpathu expanduseru expandvarsuisabsuislinku splitdriveusplitextusplitu__all__ucurdirupardiruextsepusepualtsepupathsepudefpathudevnullunormcaseujoinusplituncubasenameudirnameuexistsulexistsuismountunormpathuabspathurealpathuFalseusupports_unicode_filenames(((u//opt/alt/python33/lib64/python3.3/os2emxpath.pyus:   4