Viewing File: /opt/alt/python35/lib64/python3.5/__pycache__/macurl2path.cpython-35.opt-1.pyc



©ÕYf¬
ã@sRdZddlZddlZddgZdd„Zdd„Zdd„ZdS)	zqMacintosh-specific module for conversion between pathnames and URLs.

Do not import directly; use urllib instead.éNÚurl2pathnameÚpathname2urlcCsétjj|ƒd}|r4|dkr4tdƒ‚|dd…dkr]|dd…}n"|dd…dkrtdƒ‚|jd	ƒ}d}xÆ|t|ƒkr\||d
krÃ||=q—||dkr|dkr||ddkr||d|d…=|d}q—||d
krO|dkrO||dd
krO||=q—|d}q—W|dsƒdj|dd…ƒ}nVd}x:|t|ƒkrÅ||dkrÅd
||<|d}qŒWddj|ƒ}tjj|ƒ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//ú/Ú.ú..éÚú:)rr	)ÚurllibÚparseZ	splittypeÚRuntimeErrorÚsplitÚlenÚjoinZunquote)ÚpathnameÚtpÚ
componentsÚiÚrv©rú0/opt/alt/python35/lib64/python3.5/macurl2path.pyr
s6

0

%
cCsÏd|krtdƒ‚|jdƒ}|ddkr>|d=|d	dkrU|d
=x4tt|ƒƒD] }||dkrhd||<qhWtt|ƒ}tjj|ƒr¾ddj	|ƒSdj	|ƒSdS)z{OS-specific conversion from a file system path to a relative URL
    of the 'file' scheme; not recommended for general use.rz*Cannot convert pathname containing slashesrrrr
z..Néÿÿÿÿr)
rrÚrangerÚmapÚ_pncomp2urlÚosÚpathÚisabsr)rrrrrrr4scCs tjj|dd…ddƒS)NéZsafer)r
rZquote)Z	componentrrrrKsr)Ú__doc__Zurllib.parser
rÚ__all__rrrrrrrÚ<module>s*
Back to Directory File Manager