N
O5c       s   d  Z  k Z k Z k Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z e i e i d Z d   Z d   Z d S(   s   Common pathname manipulations, WindowsNT/95 version. 
Instead of importing this module
directly, import os and refer to this module as os.path.
c    s    t  i t  i |  d d   Sd S(   sg   Normalize case of pathname.

    Makes all characters lowercase and all slashes into backslashes.

    s   /s   \N(   s   strings   lowers   replaces   s(   s   ss0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   normcase s     c    s/   t  |   d }  |  d j o |  d  d j Sd S(   s   Test whether a path is absolutei   s    s   /\N(   s
   splitdrives   s(   s   ss0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   isabs s     c    sv   |  } xe | d r[ } t |  o
 | } n? | d j p | d d j o | | } n | t i | } q W| Sd S(   s=   Join two or more pathname components, inserting "\" as neededi    s    i   s   /\N(   s   as   paths   ps   bs   isabss   oss   sep(   s   as   ps   paths   bs0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   join' s     	 
c    s;   |  d d !d j o |  d d !|  d f Sn d |  f Sd S(   sl   Split a pathname into drive and path specifiers. Returns a 2-tuple
"(drive,path)";  either part may be emptyi   i   s   :i    s    N(   s   p(   s   ps0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys
   splitdrive7 s     c    s2  t  |   \ } }  d } x8 |  o |  d d j o | |  d } |  d  }  q W|  d j o |  | }  n d d f \ } } xA |  d r7 } | | } | d j o | | d f \ } } n q Wd } x8 | o | d d j o | | d } | d  } q W| d j o | | } n | | | f Sd S(   s|   Split a pathname.  Returns tuple "(head, tail)" where "tail" is 
everything after the final slash.  Either part may be emptys    i   s   /\i    N(   s
   splitdrives   ps   ds   slashess   heads   tails   c(   s   ps   ds   slashess   heads   tails   cs0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   splitE s.      	 
 c    s   d d f \ } } x |  d r } | d d g j o | | | d f \ } } nX | d j o+ | o | | | f \ } } n | } n  | o | | } n | | } q W| | f Sd S(   s   Split the extension from a pathname.  Extension is everything from the
last dot to the end.  Returns "(root, ext)", either part may be emptys    i    s   /s   \s   .N(   s   roots   exts   ps   c(   s   ps   roots   exts   cs0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   splitextb s     	 
c    s   t  |   d Sd S(   s)   Returns the final component of a pathnamei   N(   s   splits   p(   s   ps0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   basenamew s     c    s   t  |   d Sd S(   s-   Returns the directory component of a pathnamei    N(   s   splits   p(   s   ps0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   dirname~ s     c    s   |  o d Sn |  d } xp |  d rf } x] t t |   d rG } | | d  | | d  j o$ | |  } | d j o d Sn Pn q> Wq# W| Sd S(   sG   Given a list of pathnames, returns the longest common leading components    i    i   N(   s   ms   prefixs   items   ranges   lens   i(   s   ms   prefixs   items   is0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   commonprefix s      
	  
 c    s   d Sd S(   s=   Test for symbolic link.  On WindowsNT/95 always returns falsei    N(    (   s   paths0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   islink s     c    s8   y t  i |   } Wn t  i j
 o d Sn Xd Sd S(   s   Test whether a path existsi    i   N(   s   oss   stats   paths   sts   error(   s   paths   sts0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   exists s     	c    sH   y t  i |   } Wn t  i j
 o d Sn Xt i | t i  Sd S(   s"   Test whether a path is a directoryi    N(   s   oss   stats   paths   sts   errors   S_ISDIRs   ST_MODE(   s   paths   sts0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   isdir s     	c    sH   y t  i |   } Wn t  i j
 o d Sn Xt i | t i  Sd S(   s%   Test whether a path is a regular filei    N(   s   oss   stats   paths   sts   errors   S_ISREGs   ST_MODE(   s   paths   sts0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   isfile s     	c    s/   t  i |   } t  i |  } t | |  Sd S(   s9   Test whether two pathnames reference the same actual fileN(   s   oss   stats   f1s   s1s   f2s   s2s   samestat(   s   f1s   f2s   s1s   s2s0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   samefile s     c    s;   t  i |  i    } t  i | i    } t | |  Sd S(   sS   Test whether two open file objects reference the same file (may not
work correctly)N(   s   oss   fstats   fp1s   filenos   s1s   fp2s   s2s   samestat(   s   fp1s   fp2s   s1s   s2s0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   sameopenfile s     c    s7   |  t i | t i j o |  t i | t i j Sd S(   s5   Test whether two stat buffers reference the same fileN(   s   s1s   stats   ST_INOs   s2s   ST_DEV(   s   s1s   s2s0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   samestat s     c    s5   t  |   d } t |  d j o | d d j Sd S(   s?   Test whether a path is a mount point (defined as root of drive)i   i    s   /\N(   s
   splitdrives   paths   ps   len(   s   paths   ps0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   ismount s     c    s   y t  i |   } Wn t  i j
 o d Sn X| | |  |  d d f } xQ | d rG } | | j o4 t	 |  |  } t
 |  o t | | |  n n qU Wd S(   s   walk(top,func,args) calls func(arg, d, files) for each directory "d" 
in the tree  rooted at "top" (including "top" itself).  "files" is a list
of all the files and subdirs in directory "d".
Ns   .s   ..i    (   s   oss   listdirs   tops   namess   errors   funcs   args
   exceptionss   names   joins   isdirs   walk(   s   tops   funcs   args   namess
   exceptionss   names0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   walk s     		 c    s	  |  d  d j o |  Sn d t |   f \ } } x- | | j  o |  | d j o | d } q4 W| d j o t i i d  o t i d } n` t i i d  o |  SnD y t i d } Wn t	 j
 o d } n Xt
 | t i d  } n |  S| |  | Sd S(	   sK   Expand ~ and ~user constructions.  If user or $HOME is unknown, 
do nothingi   s   ~s   /\s   HOMEs   HOMEPATHs	   HOMEDRIVEs    N(   s   paths   lens   is   ns   oss   environs   has_keys   userhomes   drives   KeyErrors   join(   s   paths   is   ns   userhomes   drives0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys
   expanduser
s&      s   _-c    s  d |  j o |  Sn d } d } t |   } xS| | j  oE|  | } | d j ow |  | d }  t |   } y, t i |  d  } | d |  | d  } Wn* t i j
 o | |  } | d } n Xn| d j o|  | d | d !d j o | | } | d } n[|  | d | d !d j o |  | d }  t |   } yH t i |  d  } |  |  } t	 i
 i |  o | t	 i
 | } n Wn* t i j
 o | |  } | d } n Xn d } | d } |  | | d !} xD | d j o
 | t j o) | | } | d } |  | | d !} qWt	 i
 i |  o | t	 i
 | } n | d j o | | } n n | | } | d } q0 W| Sd	 S(
   sU   Expand shell variables of form $var and ${var}.  Unknown variables
are left unchangeds   $s    i    s   'i   i   s   {s   }N(   s   paths   ress   indexs   lens   pathlens   cs   strings   index_errors   vars   oss   environs   has_keys   varchars(   s   paths   ress   indexs   pathlens   cs   vars0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys
   expandvars-s`      





 


c    s  t  i |  d d  }  t |   \ } }  x0 |  d  t i j o | t i } |  d }  q* Wt  i |  t i  } d } x | t
 |  j  o | | d j o | | =n | | d j o% | d j o | | d d d f j o  | | d | d 5| d } nI | | d j o | d j o | | d d j o | | =n | d } qx W| o | o | i d  n | t  i | t i  Sd S(	   s0   Normalize path, eliminating double slashes, etc.s   /s   \i   i    s   .s   ..s    N(   s   strings   replaces   paths
   splitdrives   prefixs   oss   seps   splitfieldss   compss   is   lens   appends
   joinfields(   s   paths   prefixs   compss   is0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   normpathes,       93N(   s   __doc__s   oss   stats   strings   normcases   isabss   joins
   splitdrives   splits   splitexts   basenames   dirnames   commonprefixs   islinks   existss   isdirs   isfiles   samefiles   sameopenfiles   samestats   ismounts   walks
   expandusers   letterss   digitss   varcharss
   expandvarss   normpath(    s0   /var/tmp/python-root/usr/lib/python1.5/ntpath.pys   ? s2   																				!	8