tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
L\¬Qc@shdZddlZddlZddgZd„Zd„Zd„Zd„Zed    krdeƒndS(
sqMacintosh-specific module for conversion between pathnames and URLs.
 
Do not import directly; use urllib instead.iÿÿÿÿNt url2pathnamet pathname2urlcCsÈtj|ƒd}|r1|dkr1td‚n|d dkrN|d}n|d dkrjtd‚n|jdƒ}d}xÃ|t|ƒkrD||d    kr®||=q‚||d
krý|dkrý||d dkrý||d |d 5|d }q‚||d kr7|dkr7||d d kr7||=q‚|d }q‚W|dsed j|d ƒ}nVd}x:|t|ƒkr§||d
kr§d ||<|d }qnWd d j|ƒ}tj|ƒS(s{OS-specific conversion from a relative URL of the 'file' scheme
    to a file system path; not recommended for general use.itfiles(Cannot convert non-local URL to pathnameis///is//t/t.s..itt:(Rs..(turllibt    splittypet RuntimeErrortsplittlentjointunquote(tpathnamettpt
componentstitrv((sS/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/macurl2path.pyR
s6   
 0
 
%
cCsØd|krtd‚n|jdƒ}|ddkrA|d=n|ddkr[|d=nx7tt|ƒƒD]#}||dkrnd||<qnqnWtt|ƒ}tjj|ƒrÇddj    |ƒSdj    |ƒSdS(    s{OS-specific conversion from a file system path to a relative URL
    of the 'file' scheme; not recommended for general use.Rs*Cannot convert pathname containing slashesRiRiÿÿÿÿs..N(
R    R
trangeR tmapt _pncomp2urltostpathtisabsR (RRR((sS/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/macurl2path.pyR4s  
 
cCstj|d ddƒ}|S(NitsafeR(Rtquote(t    component((sS/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/macurl2path.pyRKscCswx2dddddgD]}d|t|ƒfGHqWx;ddd    d
d d d dgD]}d|t|ƒfGHqTWdS(Ns
index.htmlsbar/index.htmls/foo/bar/index.htmls    /foo/bar/Rs%r -> %rsdrive:s
drive:dir:sdrive:dir:files
drive:fileRs:files:dir:s    :dir:file(RR(turlR((sS/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/macurl2path.pyttestOs  t__main__(    t__doc__RRt__all__RRRRt__name__(((sS/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/macurl2path.pyt<module>s       *