Ńň
mČKc           @   s   d  Z  d   Z d   Z d S(   s3   Convert a NT pathname to a file URL and vice versa.c         C   s5  d d k  } d d k } |  i d d  }  d |  j oE |  d  d j o |  d }  n |  i d  } | i d	 i |   S|  i d  } t |  d j p | d
 d | i j o d |  } t |  n | d
 d i	   } | d i d  } | d } x0 | D]( } | o | d	 | i |  } qqW| S(   s{   OS-specific conversion from a relative URL of the 'file' scheme
    to a file system path; not recommended for general use.i˙˙˙˙Nt   :t   |i   s   ////i   t   /s   \i    s	   Bad URL: i   (
   t   stringt   urllibt   replacet   splitt   unquotet   joint   lent   ascii_letterst   IOErrort   upper(   t   urlR   R   t
   componentst   compt   errort   drivet   path(    (    s    /usr/lib/python2.6/nturl2path.pyt   url2pathname   s&    +

 c         C   s  d d k  } d |  j oE |  d  d j o d |  }  n |  i d  } | i d i |   S|  i d  } t |  d j p t | d  d	 j o d
 |  } t |  n | i | d i    } | d	 i d  } d | d } x0 | D]( } | o | d | i |  } qď qď W| S(   s{   OS-specific conversion from a file system path to a relative URL
    of the 'file' scheme; not recommended for general use.i˙˙˙˙NR    i   s   \\s   \R   i    i   s
   Bad path: s   ///(   R   R   t   quoteR   R	   R   R   (   t   pR   R   R   R   R   R   (    (    s    /usr/lib/python2.6/nturl2path.pyt   pathname2url#   s$    *
 N(   t   __doc__R   R   (    (    (    s    /usr/lib/python2.6/nturl2path.pyt   <module>   s   	 