Edit File: macurl2path.cpython-36.pyc
3 � \� ������������������@���s8���d�Z�ddlZddlZddgZdd��Zdd��Zdd��ZdS�) zqMacintosh-specific module for conversion between pathnames and URLs. Do not import directly; use urllib instead.�����N�url2pathname�pathname2urlc�������������C���st��t�jj|��d�}|r$|dkr$td��|�dd��dkrB|�dd��}�n|�dd��dkrZtd��|�jd �}d}x�|t|�k��r||�d kr�||=�qj||�dkr�|dkr�||d��dkr�||d�|d��=�|d�}qj||�d kr�|dkr�||d��d kr�||=�qj|d�}qjW�|d��s"dj|dd���}nFd}x2|t|�k��rX||�dk�rXd ||<�|d�}�q(W�ddj|��}t�jj|�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�joinZunquote)�pathname�tp� components�i�rv��r����#/usr/lib64/python3.6/macurl2path.pyr��� ���s6���� $ c�������������C���s����d|�krt�d��|�jd�}|d�dkr,|d=�|d �dkr>|d =�x(tt|��D�]}||�dkrLd||<�qLW�tt|�}tjj|��r�ddj |��S�dj |�S�dS�)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�jj|�d�d��dd�S�)N����r���)Zsafe)r ���r���Zquote)Z componentr���r���r���r���K���s����r���)�__doc__Zurllib.parser ���r����__all__r���r���r���r���r���r���r����<module>���s���*