wdZdZdZy)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. cddl}ddl}|dddk(r|dd}n |dddk(r|dd}|dddk(r|d d}|jd d }d |vr+|jj |jd d S|j d }t |dk7s|dd|jvrd|z}t||ddj}|jj |d jd d }|d z|zS)z{OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.N/// z //localhost/ :|/\z Bad URL: ) string urllib.parsereplaceparseunquotesplitlen ascii_lettersOSErrorupper)urlrurllibcomperrordrivetails 1/opt/alt/python312/lib64/python3.12/nturl2path.py url2pathnamer s  2Aw%!"g Sb^ #"#h 2Aw%!"g ++c3 C #:||##CKKT$:;; 99S>D 4yA~aF,@,@@c!en GBK   E <<  QT : ;D 3; cddl}|jdd}|dddk(r:|dd}|ddjdk(r d|ddz}n|d d d k7rtd |zd |vr|jj |S|j d d }t|d k7st|dd kDrd |z}t||jj |dj}|jj |d }d|zd z|zS)z{OS-specific conversion from a file system path to a relative URL of the 'file' scheme; not recommended for general use.rNr r z//?/zUNC/z//r rr z Bad path: )maxsplitr)rrrrrquoterr)prrrrrs r pathname2urlr'*s $A!u abE Ra5;;=F "qu A qVs],*+ + !8||!!!$$ 7737 #D 4yA~T!W)q en LL  tAw}} /E <<  d1g &D 5=3  %%r!N)__doc__r r'r!rr*s D&r!