QfG dZdZdZy)zConvert a NT pathname to a file URL and vice versa. This module only exists to provide OS-specific code for urllib.requests, thus do not use directly. cZddl}ddl}|jdd}d|vrH|dddk(r|dd}|jd}|jj d j |S|jd}t|dk7s|dd |jvrd |z}t||dd j}|d jd}|dz}|D]&}|s|d z|jj |z}(|jdr|jdr|d z }|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: ) string urllib.parsereplacesplitparseunquotejoinlen ascii_lettersOSErrorupperendswith)urlr urllib componentscomperrordrivepaths 1/opt/alt/python312/lib64/python3.12/nturl2path.py url2pathnamer s' ++c3 C #: r7f ab'CYYs^ ||##DIIj$9:: 99S>D 4yA~aF,@,@@c!en GBK   Eas#J 3;D $;!5!5d!;;D }}Scll3/   Kcddl}|dddk(r:|dd}|ddjdk(r d|ddz}n|ddd k7rtd |zd |vrH|ddd k(rd |z}|jd}|jj d j |S|jd d }t|dk7st|ddkDrd |z}t||jj |dj}|djd}d|zd z}|D]&}|s|d z|jj |z}(|S)z{OS-specific conversion from a file system path to a relative URL of the 'file' scheme; not recommended for general use.rNrz\\?\zUNC\r r rrz Bad path: z\\r)maxsplitz///)r rrrrquoterr)prrrrrrs r pathname2urlr&-s[ !u  abE Ra5;;=G #qu A qVs],*+ + !8 Ra5F? AWWT] ||!!#((:"677 7737 #D 4yA~T!W)q en LL  tAw}} /Eat$J 5=3 D #: 2 24 88D Kr!N)__doc__r r&r!rr)s#J$r!