Viewing File: /opt/alt/python38/lib64/python3.8/__pycache__/nturl2path.cpython-38.opt-1.pyc

U

,aG@sdZddZddZdS)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.
cCsddl}ddl}|dd}d|kr\|dddkr@|dd}|d}|jd	|S|d}t|dks|dd
|jkrd|}t	||dd

}|dd}|d}|D]}|r|d	|j|}q|dr|dr|d	7}|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.parsereplacesplitparseZunquotejoinlenZ
ascii_lettersOSErrorupperendswith)Zurlr
urllib
componentscomperrordrivepathr//opt/alt/python38/lib64/python3.8/nturl2path.pyurl2pathnames(	

rcCs4ddl}|dddkrf|dd}|dddkrJd|dd}n|ddd	krftd
|d	|kr|dddkrd|}|d}|jd|S|jd	dd
}t|dkst|ddkrd
|}t||j|d}|dd}d|d	}|D] }|r|d|j|}q|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\rr	rrz
Bad path: z\\r)maxsplitz///)rrrr
rZquoterr)prrrrrrrrrpathname2url-s.
rN)__doc__rrrrrr<module>s%
Back to Directory File Manager