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

  \¬
  ã               @   s8   d Z ddlZddlZddgZdd„ Zdd„ Zdd„ ZdS )	zqMacintosh-specific module for conversion between pathnames and URLs.

Do not import directly; use urllib instead.é    NÚurl2pathnameÚpathname2urlc             C   st  t jj| ƒd }|r$|dkr$tdƒ‚| dd… dkrB| dd… } n| dd… dkrZtdƒ‚| jd	ƒ}d}xš|t|ƒk �r|| d
krŒ||= qj|| dkrÌ|dkrÌ||d  dkrÌ||d |d …= |d }qj|| dkrø|dkrø||d  dkrø||= qj|d }qjW |d �s"dj|dd… ƒ}nFd}x2|t|ƒk �rX|| dk�rXd||< |d }�q(W ddj|ƒ }t jj|ƒS )z{OS-specific conversion from a relative URL of the 'file' scheme
    to a file system path; not recommended for general use.r   Úfilez(Cannot convert non-local URL to pathnameNé   z///é   z//ú/Ú.ú..é   Ú ú:)r   r	   )ÚurllibÚparseZ	splittypeÚRuntimeErrorÚsplitÚlenÚjoinZunquote)ÚpathnameÚtpÚ
componentsÚiÚrv© r   ú#/usr/lib64/python3.6/macurl2path.pyr   
   s6    

$
c             C   sš   d| krt dƒ‚| jdƒ}|d dkr,|d= |d	 dkr>|d
= x(tt|ƒƒD ]}|| dkrLd||< qLW tt|ƒ}tjj| ƒrŒddj	|ƒ S dj	|ƒS dS )z{OS-specific conversion from a file system path to a relative URL
    of the 'file' scheme; not recommended for general use.r   z*Cannot convert pathname containing slashesr   r   r   r
   z..Néÿÿÿÿr   )
r   r   Úranger   ÚmapÚ_pncomp2urlÚosÚpathÚisabsr   )r   r   r   r   r   r   r   4   s    

c             C   s   t jj| d d… dd�S )Né   r   )Zsafe)r   r   Zquote)Z	componentr   r   r   r   K   s    r   )Ú__doc__Zurllib.parser   r   Ú__all__r   r   r   r   r   r   r   Ú<module>   s   *