Back
Type Name Operations
__phello__ Open
__pycache__ Open
_pyrepl Open
asyncio Open
collections Open
concurrent Open
config-3.13-x86_64-linux-gnu Open
ctypes Open
curses Open
dbm Open
email Open
encodings Open
ensurepip Open
html Open
http Open
idlelib Open
importlib Open
json Open
lib-dynload Open
logging Open
multiprocessing Open
pathlib Open
pydoc_data Open
site-packages Open
sqlite3 Open
sysconfig Open
tkinter Open
tomllib Open
turtledemo Open
unittest Open
urllib Open
venv Open
wsgiref Open
xml Open
xmlrpc Open
zipfile Open
zoneinfo Open
LICENSE.txt
__future__.py
__hello__.py
_aix_support.py
_android_support.py
_apple_support.py
_collections_abc.py
_colorize.py
_compat_pickle.py
_compression.py
_ios_support.py
_markupbase.py
_opcode_metadata.py
_osx_support.py
_py_abc.py
_pydatetime.py
_pydecimal.py
_pyio.py
_pylong.py
_sitebuiltins.py
_strptime.py
_sysconfigdata__linux_x86_64-linux-gnu.py
_threading_local.py
_weakrefset.py
abc.py
antigravity.py
argparse.py
ast.py
base64.py
bdb.py
bisect.py
bz2.py
cProfile.py
calendar.py
cmd.py
code.py
codecs.py
codeop.py
colorsys.py
compileall.py
configparser.py
contextlib.py
contextvars.py
copy.py
copyreg.py
csv.py
dataclasses.py
datetime.py
decimal.py
difflib.py
dis.py
doctest.py
enum.py
filecmp.py
fileinput.py
fnmatch.py
fractions.py
ftplib.py
functools.py
genericpath.py
getopt.py
getpass.py
gettext.py
glob.py
graphlib.py
gzip.py
hashlib.py
heapq.py
hmac.py
imaplib.py
inspect.py
io.py
ipaddress.py
keyword.py
linecache.py
locale.py
lzma.py
mailbox.py
mimetypes.py
modulefinder.py
netrc.py
ntpath.py
nturl2path.py
numbers.py
opcode.py
operator.py
optparse.py
os.py
pdb.py
pickle.py
pickletools.py
pkgutil.py
platform.py
plistlib.py
poplib.py
posixpath.py
pprint.py
profile.py
pstats.py
pty.py
py_compile.py
pyclbr.py
pydoc.py
queue.py
quopri.py
random.py
reprlib.py
rlcompleter.py
runpy.py
sched.py
secrets.py
selectors.py
shelve.py
shlex.py
shutil.py
signal.py
site.py
smtplib.py
socket.py
socketserver.py
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py
stat.py
statistics.py
string.py
stringprep.py
struct.py
subprocess.py
symtable.py
tabnanny.py
tarfile.py
tempfile.py
textwrap.py
this.py
threading.py
timeit.py
token.py
tokenize.py
trace.py
traceback.py
tracemalloc.py
tty.py
turtle.py
types.py
typing.py
uuid.py
warnings.py
wave.py
weakref.py
webbrowser.py
zipapp.py
zipimport.py

File Transfer

Upload files to current directory

File Editor: nturl2path.py

"""Convert 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. """ # Testing is done through test_urllib. def url2pathname(url): """OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.""" # e.g. # ///C|/foo/bar/spam.foo # and # ///C:/foo/bar/spam.foo # become # C:\foo\bar\spam.foo import string, urllib.parse if url[:3] == '///': # URL has an empty authority section, so the path begins on the third # character. url = url[2:] elif url[:12] == '//localhost/': # Skip past 'localhost' authority. url = url[11:] if url[:3] == '///': # Skip past extra slash before UNC drive in URL path. url = url[1:] # Windows itself uses ":" even in URLs. url = url.replace(':', '|') if not '|' in url: # No drive specifier, just convert slashes # make sure not to convert quoted slashes :-) return urllib.parse.unquote(url.replace('/', '\\')) comp = url.split('|') if len(comp) != 2 or comp[0][-1] not in string.ascii_letters: error = 'Bad URL: ' + url raise OSError(error) drive = comp[0][-1].upper() tail = urllib.parse.unquote(comp[1].replace('/', '\\')) return drive + ':' + tail def pathname2url(p): """OS-specific conversion from a file system path to a relative URL of the 'file' scheme; not recommended for general use.""" # e.g. # C:\foo\bar\spam.foo # becomes # ///C:/foo/bar/spam.foo import urllib.parse # First, clean up some special forms. We are going to sacrifice # the additional information anyway p = p.replace('\\', '/') if p[:4] == '//?/': p = p[4:] if p[:4].upper() == 'UNC/': p = '//' + p[4:] elif p[1:2] != ':': raise OSError('Bad path: ' + p) if not ':' in p: # No DOS drive specified, just quote the pathname return urllib.parse.quote(p) comp = p.split(':', maxsplit=2) if len(comp) != 2 or len(comp[0]) > 1: error = 'Bad path: ' + p raise OSError(error) drive = urllib.parse.quote(comp[0].upper()) tail = urllib.parse.quote(comp[1]) return '///' + drive + ':' + tail