
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3

  \Œ	  ã               @   s   d Z dd„ Zdd„ ZdS )z3Convert a NT pathname to a file URL and vice versa.c             C   s  ddl }ddl}| jddƒ} d| kr\| dd… dkr@| dd… } | jdƒ}|jjd	j|ƒƒS | jdƒ}t|ƒdks„|d d |jkr”d|  }t	|ƒ‚|d d j
ƒ }|d
 jdƒ}|d }x$|D ]}|rÀ|d	 |jj|ƒ }qÀW |jdƒoò| jdƒ� rþ|d	7 }|S )z{OS-specific conversion from a relative URL of the 'file' scheme
    to a file system path; not recommended for general use.é    Nú:ú|é   z////é   ú/ú\é   z	Bad URL: éÿÿÿÿr	   )ÚstringÚurllib.parseÚreplaceÚsplitÚparseZunquoteÚjoinÚlenZascii_lettersÚOSErrorÚupperÚendswith)Zurlr
   ÚurllibÚ
componentsÚcompÚerrorÚdriveÚpath© r   ú"/usr/lib64/python3.6/nturl2path.pyÚurl2pathname   s(    	


r   c             C   sÒ   ddl }d| krD| dd… dkr(d|  } | jdƒ}|jjdj|ƒƒS | jdƒ}t|ƒdksjt|d ƒdkrzd	|  }t|ƒ‚|jj|d jƒ ƒ}|d jdƒ}d
| d }x$|D ]}|r®|d |jj|ƒ }q®W |S )z{OS-specific conversion from a file system path to a relative URL
    of the 'file' scheme; not recommended for general use.r   Nr   r   z\\r   r   r   z
Bad path: z///)r   r   r   Zquoter   r   r   r   )Úpr   r   r   r   r   r   r   r   r   Úpathname2url(   s"    


r   N)Ú__doc__r   r   r   r   r   r   Ú<module>   s   %