Ĵ˙f\ c @ s" d Z d d Z d d Z d S( u3 Convert a NT pathname to a file URL and vice versa.c C sl d d l } d d l } | j d d } d | k r | d d d k r_ | d d } n | j d } | j j d j | S| j d } t | d k sż | d d | j k rĜ d | } t | n | d d j } | d j d } | d } x1 | D]) } | r| d | j j | } qqW| j d rh| j d rh| d 7} n | S( u{ OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.i Nu :u |i u ////i u /u \i u Bad URL: i˙˙˙˙i˙˙˙˙( u stringu urllib.parseu replaceu splitu parseu unquoteu joinu lenu ascii_lettersu IOErroru upperu endswith( u urlu stringu urllibu componentsu compu erroru driveu path( ( u/ /opt/alt/python33/lib64/python3.3/nturl2path.pyu url2pathname s( ) ! u url2pathnamec C s( d d l } d | k rc | d d d k r; d | } n | j d } | j j d j | S| j d } t | d k s t | d d k r³ d | } t | n | j j | d j } | d j d } d | d } x1 | D]) } | r÷ | d | j j | } q÷ q÷ W| S( u{ OS-specific conversion from a file system path to a relative URL of the 'file' scheme; not recommended for general use.i Nu :i u \\u \u /i u Bad path: u ///( u urllib.parseu splitu parseu quoteu joinu lenu IOErroru upper( u pu urllibu componentsu compu erroru driveu path( ( u/ /opt/alt/python33/lib64/python3.3/nturl2path.pyu pathname2url&