You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"payload":{"allShortcutsEnabled":false,"fileTree":{"Doc/library":{"items":[{"name":"__future__.rst","path":"Doc/library/__future__.rst","contentType":"file"},{"name":"__main__.rst","path":"Doc/library/__main__.rst","contentType":"file"},{"name":"_thread.rst","path":"Doc/library/_thread.rst","contentType":"file"},{"name":"abc.rst","path":"Doc/library/abc.rst","contentType":"file"},{"name":"aifc.rst","path":"Doc/library/aifc.rst","contentType":"file"},{"name":"allos.rst","path":"Doc/library/allos.rst","contentType":"file"},{"name":"annotationlib.rst","path":"Doc/library/annotationlib.rst","contentType":"file"},{"name":"archiving.rst","path":"Doc/library/archiving.rst","contentType":"file"},{"name":"argparse.rst","path":"Doc/library/argparse.rst","contentType":"file"},{"name":"array.rst","path":"Doc/library/array.rst","contentType":"file"},{"name":"ast.rst","path":"Doc/library/ast.rst","contentType":"file"},{"name":"asynchat.rst","path":"Doc/library/asynchat.rst","contentType":"file"},{"name":"asyncio-api-index.rst","path":"Doc/library/asyncio-api-index.rst","contentType":"file"},{"name":"asyncio-dev.rst","path":"Doc/library/asyncio-dev.rst","contentType":"file"},{"name":"asyncio-eventloop.rst","path":"Doc/library/asyncio-eventloop.rst","contentType":"file"},{"name":"asyncio-exceptions.rst","path":"Doc/library/asyncio-exceptions.rst","contentType":"file"},{"name":"asyncio-extending.rst","path":"Doc/library/asyncio-extending.rst","contentType":"file"},{"name":"asyncio-future.rst","path":"Doc/library/asyncio-future.rst","contentType":"file"},{"name":"asyncio-graph.rst","path":"Doc/library/asyncio-graph.rst","contentType":"file"},{"name":"asyncio-llapi-index.rst","path":"Doc/library/asyncio-llapi-index.rst","contentType":"file"},{"name":"asyncio-platforms.rst","path":"Doc/library/asyncio-platforms.rst","contentType":"file"},{"name":"asyncio-policy.rst","path":"Doc/library/asyncio-policy.rst","contentType":"file"},{"name":"asyncio-protocol.rst","path":"Doc/library/asyncio-protocol.rst","contentType":"file"},{"name":"asyncio-queue.rst","path":"Doc/library/asyncio-queue.rst","contentType":"file"},{"name":"asyncio-runner.rst","path":"Doc/library/asyncio-runner.rst","contentType":"file"},{"name":"asyncio-stream.rst","path":"Doc/library/asyncio-stream.rst","contentType":"file"},{"name":"asyncio-subprocess.rst","path":"Doc/library/asyncio-subprocess.rst","contentType":"file"},{"name":"asyncio-sync.rst","path":"Doc/library/asyncio-sync.rst","contentType":"file"},{"name":"asyncio-task.rst","path":"Doc/library/asyncio-task.rst","contentType":"file"},{"name":"asyncio.rst","path":"Doc/library/asyncio.rst","contentType":"file"},{"name":"asyncore.rst","path":"Doc/library/asyncore.rst","contentType":"file"},{"name":"atexit.rst","path":"Doc/library/atexit.rst","contentType":"file"},{"name":"audioop.rst","path":"Doc/library/audioop.rst","contentType":"file"},{"name":"audit_events.rst","path":"Doc/library/audit_events.rst","contentType":"file"},{"name":"base64.rst","path":"Doc/library/base64.rst","contentType":"file"},{"name":"bdb.rst","path":"Doc/library/bdb.rst","contentType":"file"},{"name":"binary.rst","path":"Doc/library/binary.rst","contentType":"file"},{"name":"binascii.rst","path":"Doc/library/binascii.rst","contentType":"file"},{"name":"bisect.rst","path":"Doc/library/bisect.rst","contentType":"file"},{"name":"builtins.rst","path":"Doc/library/builtins.rst","contentType":"file"},{"name":"bz2.rst","path":"Doc/library/bz2.rst","contentType":"file"},{"name":"calendar.rst","path":"Doc/library/calendar.rst","contentType":"file"},{"name":"cgi.rst","path":"Doc/library/cgi.rst","contentType":"file"},{"name":"cgitb.rst","path":"Doc/library/cgitb.rst","contentType":"file"},{"name":"chunk.rst","path":"Doc/library/chunk.rst","contentType":"file"},{"name":"cmath.rst","path":"Doc/library/cmath.rst","contentType":"file"},{"name":"cmd.rst","path":"Doc/library/cmd.rst","contentType":"file"},{"name":"cmdline.rst","path":"Doc/library/cmdline.rst","contentType":"file"},{"name":"cmdlinelibs.rst","path":"Doc/library/cmdlinelibs.rst","contentType":"file"},{"name":"code.rst","path":"Doc/library/code.rst","contentType":"file"},{"name":"codecs.rst","path":"Doc/library/codecs.rst","contentType":"file"},{"name":"codeop.rst","path":"Doc/library/codeop.rst","contentType":"file"},{"name":"collections.abc.rst","path":"Doc/library/collections.abc.rst","contentType":"file"},{"name":"collections.rst","path":"Doc/library/collections.rst","contentType":"file"},{"name":"colorsys.rst","path":"Doc/library/colorsys.rst","contentType":"file"},{"name":"compileall.rst","path":"Doc/library/compileall.rst","contentType":"file"},{"name":"compression.rst","path":"Doc/library/compression.rst","contentType":"file"},{"name":"compression.zstd.rst","path":"Doc/library/compression.zstd.rst","contentType":"file"},{"name":"concurrency.rst","path":"Doc/library/concurrency.rst","contentType":"file"},{"name":"concurrent.futures.rst","path":"Doc/library/concurrent.futures.rst","contentType":"file"},{"name":"concurrent.rst","path":"Doc/library/concurrent.rst","contentType":"file"},{"name":"configparser.rst","path":"Doc/library/configparser.rst","contentType":"file"},{"name":"constants.rst","path":"Doc/library/constants.rst","contentType":"file"},{"name":"contextlib.rst","path":"Doc/library/contextlib.rst","contentType":"file"},{"name":"contextvars.rst","path":"Doc/library/contextvars.rst","contentType":"file"},{"name":"copy.rst","path":"Doc/library/copy.rst","contentType":"file"},{"name":"copyreg.rst","path":"Doc/library/copyreg.rst","contentType":"file"},{"name":"crypt.rst","path":"Doc/library/crypt.rst","contentType":"file"},{"name":"crypto.rst","path":"Doc/library/crypto.rst","contentType":"file"},{"name":"csv.rst","path":"Doc/library/csv.rst","contentType":"file"},{"name":"ctypes.rst","path":"Doc/library/ctypes.rst","contentType":"file"},{"name":"curses.ascii.rst","path":"Doc/library/curses.ascii.rst","contentType":"file"},{"name":"curses.panel.rst","path":"Doc/library/curses.panel.rst","contentType":"file"},{"name":"curses.rst","path":"Doc/library/curses.rst","contentType":"file"},{"name":"custominterp.rst","path":"Doc/library/custominterp.rst","contentType":"file"},{"name":"dataclasses.rst","path":"Doc/library/dataclasses.rst","contentType":"file"},{"name":"datatypes.rst","path":"Doc/library/datatypes.rst","contentType":"file"},{"name":"datetime.rst","path":"Doc/library/datetime.rst","contentType":"file"},{"name":"dbm.rst","path":"Doc/library/dbm.rst","contentType":"file"},{"name":"debug.rst","path":"Doc/library/debug.rst","contentType":"file"},{"name":"decimal.rst","path":"Doc/library/decimal.rst","contentType":"file"},{"name":"development.rst","path":"Doc/library/development.rst","contentType":"file"},{"name":"devmode.rst","path":"Doc/library/devmode.rst","contentType":"file"},{"name":"dialog.rst","path":"Doc/library/dialog.rst","contentType":"file"},{"name":"difflib.rst","path":"Doc/library/difflib.rst","contentType":"file"},{"name":"dis.rst","path":"Doc/library/dis.rst","contentType":"file"},{"name":"distribution.rst","path":"Doc/library/distribution.rst","contentType":"file"},{"name":"distutils.rst","path":"Doc/library/distutils.rst","contentType":"file"},{"name":"doctest.rst","path":"Doc/library/doctest.rst","contentType":"file"},{"name":"email.charset.rst","path":"Doc/library/email.charset.rst","contentType":"file"},{"name":"email.compat32-message.rst","path":"Doc/library/email.compat32-message.rst","contentType":"file"},{"name":"email.contentmanager.rst","path":"Doc/library/email.contentmanager.rst","contentType":"file"},{"name":"email.encoders.rst","path":"Doc/library/email.encoders.rst","contentType":"file"},{"name":"email.errors.rst","path":"Doc/library/email.errors.rst","contentType":"file"},{"name":"email.examples.rst","path":"Doc/library/email.examples.rst","contentType":"file"},{"name":"email.generator.rst","path":"Doc/library/email.generator.rst","contentType":"file"},{"name":"email.header.rst","path":"Doc/library/email.header.rst","contentType":"file"},{"name":"email.headerregistry.rst","path":"Doc/library/email.headerregistry.rst","contentType":"file"},{"name":"email.iterators.rst","path":"Doc/library/email.iterators.rst","contentType":"file"},{"name":"email.message.rst","path":"Doc/library/email.message.rst","contentType":"file"},{"name":"email.mime.rst","path":"Doc/library/email.mime.rst","contentType":"file"},{"name":"email.parser.rst","path":"Doc/library/email.parser.rst","contentType":"file"},{"name":"email.policy.rst","path":"Doc/library/email.policy.rst","contentType":"file"},{"name":"email.rst","path":"Doc/library/email.rst","contentType":"file"},{"name":"email.utils.rst","path":"Doc/library/email.utils.rst","contentType":"file"},{"name":"ensurepip.rst","path":"Doc/library/ensurepip.rst","contentType":"file"},{"name":"enum.rst","path":"Doc/library/enum.rst","contentType":"file"},{"name":"errno.rst","path":"Doc/library/errno.rst","contentType":"file"},{"name":"exceptions.rst","path":"Doc/library/exceptions.rst","contentType":"file"},{"name":"faulthandler.rst","path":"Doc/library/faulthandler.rst","contentType":"file"},{"name":"fcntl.rst","path":"Doc/library/fcntl.rst","contentType":"file"},{"name":"filecmp.rst","path":"Doc/library/filecmp.rst","contentType":"file"},{"name":"fileformats.rst","path":"Doc/library/fileformats.rst","contentType":"file"},{"name":"fileinput.rst","path":"Doc/library/fileinput.rst","contentType":"file"},{"name":"filesys.rst","path":"Doc/library/filesys.rst","contentType":"file"},{"name":"fnmatch.rst","path":"Doc/library/fnmatch.rst","contentType":"file"},{"name":"fractions.rst","path":"Doc/library/fractions.rst","contentType":"file"},{"name":"frameworks.rst","path":"Doc/library/frameworks.rst","contentType":"file"},{"name":"ftplib.rst","path":"Doc/library/ftplib.rst","contentType":"file"},{"name":"functional.rst","path":"Doc/library/functional.rst","contentType":"file"},{"name":"functions.rst","path":"Doc/library/functions.rst","contentType":"file"},{"name":"functools.rst","path":"Doc/library/functools.rst","contentType":"file"},{"name":"gc.rst","path":"Doc/library/gc.rst","contentType":"file"},{"name":"getopt.rst","path":"Doc/library/getopt.rst","contentType":"file"},{"name":"getpass.rst","path":"Doc/library/getpass.rst","contentType":"file"},{"name":"gettext.rst","path":"Doc/library/gettext.rst","contentType":"file"},{"name":"glob.rst","path":"Doc/library/glob.rst","contentType":"file"},{"name":"graphlib.rst","path":"Doc/library/graphlib.rst","contentType":"file"},{"name":"grp.rst","path":"Doc/library/grp.rst","contentType":"file"},{"name":"gzip.rst","path":"Doc/library/gzip.rst","contentType":"file"},{"name":"hashlib-blake2-tree.png","path":"Doc/library/hashlib-blake2-tree.png","contentType":"file"},{"name":"hashlib.rst","path":"Doc/library/hashlib.rst","contentType":"file"},{"name":"heapq-binary-tree.svg","path":"Doc/library/heapq-binary-tree.svg","contentType":"file"},{"name":"heapq.rst","path":"Doc/library/heapq.rst","contentType":"file"},{"name":"hmac.rst","path":"Doc/library/hmac.rst","contentType":"file"},{"name":"html.entities.rst","path":"Doc/library/html.entities.rst","contentType":"file"},{"name":"html.parser.rst","path":"Doc/library/html.parser.rst","contentType":"file"},{"name":"html.rst","path":"Doc/library/html.rst","contentType":"file"},{"name":"http.client.rst","path":"Doc/library/http.client.rst","contentType":"file"},{"name":"http.cookiejar.rst","path":"Doc/library/http.cookiejar.rst","contentType":"file"},{"name":"http.cookies.rst","path":"Doc/library/http.cookies.rst","contentType":"file"},{"name":"http.rst","path":"Doc/library/http.rst","contentType":"file"},{"name":"http.server.rst","path":"Doc/library/http.server.rst","contentType":"file"},{"name":"i18n.rst","path":"Doc/library/i18n.rst","contentType":"file"},{"name":"idle.rst","path":"Doc/library/idle.rst","contentType":"file"},{"name":"imaplib.rst","path":"Doc/library/imaplib.rst","contentType":"file"},{"name":"imghdr.rst","path":"Doc/library/imghdr.rst","contentType":"file"},{"name":"imp.rst","path":"Doc/library/imp.rst","contentType":"file"},{"name":"importlib.metadata.rst","path":"Doc/library/importlib.metadata.rst","contentType":"file"},{"name":"importlib.resources.abc.rst","path":"Doc/library/importlib.resources.abc.rst","contentType":"file"},{"name":"importlib.resources.rst","path":"Doc/library/importlib.resources.rst","contentType":"file"},{"name":"importlib.rst","path":"Doc/library/importlib.rst","contentType":"file"},{"name":"index.rst","path":"Doc/library/index.rst","contentType":"file"},{"name":"inspect.rst","path":"Doc/library/inspect.rst","contentType":"file"},{"name":"internet.rst","path":"Doc/library/internet.rst","contentType":"file"},{"name":"intro.rst","path":"Doc/library/intro.rst","contentType":"file"},{"name":"io.rst","path":"Doc/library/io.rst","contentType":"file"},{"name":"ipaddress.rst","path":"Doc/library/ipaddress.rst","contentType":"file"},{"name":"ipc.rst","path":"Doc/library/ipc.rst","contentType":"file"},{"name":"itertools.rst","path":"Doc/library/itertools.rst","contentType":"file"},{"name":"json.rst","path":"Doc/library/json.rst","contentType":"file"},{"name":"kde_example.png","path":"Doc/library/kde_example.png","contentType":"file"},{"name":"keyword.rst","path":"Doc/library/keyword.rst","contentType":"file"},{"name":"language.rst","path":"Doc/library/language.rst","contentType":"file"},{"name":"linecache.rst","path":"Doc/library/linecache.rst","contentType":"file"},{"name":"locale.rst","path":"Doc/library/locale.rst","contentType":"file"},{"name":"logging.config.rst","path":"Doc/library/logging.config.rst","contentType":"file"},{"name":"logging.handlers.rst","path":"Doc/library/logging.handlers.rst","contentType":"file"},{"name":"logging.rst","path":"Doc/library/logging.rst","contentType":"file"},{"name":"lzma.rst","path":"Doc/library/lzma.rst","contentType":"file"},{"name":"mailbox.rst","path":"Doc/library/mailbox.rst","contentType":"file"},{"name":"mailcap.rst","path":"Doc/library/mailcap.rst","contentType":"file"},{"name":"markup.rst","path":"Doc/library/markup.rst","contentType":"file"},{"name":"marshal.rst","path":"Doc/library/marshal.rst","contentType":"file"},{"name":"math.rst","path":"Doc/library/math.rst","contentType":"file"},{"name":"mimetypes.rst","path":"Doc/library/mimetypes.rst","contentType":"file"},{"name":"mm.rst","path":"Doc/library/mm.rst","contentType":"file"},{"name":"mmap.rst","path":"Doc/library/mmap.rst","contentType":"file"},{"name":"modulefinder.rst","path":"Doc/library/modulefinder.rst","contentType":"file"},{"name":"modules.rst","path":"Doc/library/modules.rst","contentType":"file"},{"name":"msilib.rst","path":"Doc/library/msilib.rst","contentType":"file"},{"name":"msvcrt.rst","path":"Doc/library/msvcrt.rst","contentType":"file"},{"name":"multiprocessing.rst","path":"Doc/library/multiprocessing.rst","contentType":"file"},{"name":"multiprocessing.shared_memory.rst","path":"Doc/library/multiprocessing.shared_memory.rst","contentType":"file"},{"name":"netdata.rst","path":"Doc/library/netdata.rst","contentType":"file"},{"name":"netrc.rst","path":"Doc/library/netrc.rst","contentType":"file"},{"name":"nis.rst","path":"Doc/library/nis.rst","contentType":"file"},{"name":"nntplib.rst","path":"Doc/library/nntplib.rst","contentType":"file"},{"name":"numbers.rst","path":"Doc/library/numbers.rst","contentType":"file"},{"name":"numeric.rst","path":"Doc/library/numeric.rst","contentType":"file"},{"name":"operator.rst","path":"Doc/library/operator.rst","contentType":"file"},{"name":"optparse.rst","path":"Doc/library/optparse.rst","contentType":"file"},{"name":"os.path.rst","path":"Doc/library/os.path.rst","contentType":"file"},{"name":"os.rst","path":"Doc/library/os.rst","contentType":"file"},{"name":"ossaudiodev.rst","path":"Doc/library/ossaudiodev.rst","contentType":"file"},{"name":"pathlib-inheritance.png","path":"Doc/library/pathlib-inheritance.png","contentType":"file"},{"name":"pathlib-inheritance.svg","path":"Doc/library/pathlib-inheritance.svg","contentType":"file"},{"name":"pathlib.rst","path":"Doc/library/pathlib.rst","contentType":"file"},{"name":"pdb.rst","path":"Doc/library/pdb.rst","contentType":"file"},{"name":"persistence.rst","path":"Doc/library/persistence.rst","contentType":"file"},{"name":"pickle.rst","path":"Doc/library/pickle.rst","contentType":"file"},{"name":"pickletools.rst","path":"Doc/library/pickletools.rst","contentType":"file"},{"name":"pipes.rst","path":"Doc/library/pipes.rst","contentType":"file"},{"name":"pkgutil.rst","path":"Doc/library/pkgutil.rst","contentType":"file"},{"name":"platform.rst","path":"Doc/library/platform.rst","contentType":"file"},{"name":"plistlib.rst","path":"Doc/library/plistlib.rst","contentType":"file"},{"name":"poplib.rst","path":"Doc/library/poplib.rst","contentType":"file"},{"name":"posix.rst","path":"Doc/library/posix.rst","contentType":"file"},{"name":"pprint.rst","path":"Doc/library/pprint.rst","contentType":"file"},{"name":"profile.rst","path":"Doc/library/profile.rst","contentType":"file"},{"name":"pty.rst","path":"Doc/library/pty.rst","contentType":"file"},{"name":"pwd.rst","path":"Doc/library/pwd.rst","contentType":"file"},{"name":"py_compile.rst","path":"Doc/library/py_compile.rst","contentType":"file"},{"name":"pyclbr.rst","path":"Doc/library/pyclbr.rst","contentType":"file"},{"name":"pydoc.rst","path":"Doc/library/pydoc.rst","contentType":"file"},{"name":"pyexpat.rst","path":"Doc/library/pyexpat.rst","contentType":"file"},{"name":"python.rst","path":"Doc/library/python.rst","contentType":"file"},{"name":"queue.rst","path":"Doc/library/queue.rst","contentType":"file"},{"name":"quopri.rst","path":"Doc/library/quopri.rst","contentType":"file"},{"name":"random.rst","path":"Doc/library/random.rst","contentType":"file"},{"name":"re.rst","path":"Doc/library/re.rst","contentType":"file"},{"name":"readline.rst","path":"Doc/library/readline.rst","contentType":"file"},{"name":"removed.rst","path":"Doc/library/removed.rst","contentType":"file"},{"name":"reprlib.rst","path":"Doc/library/reprlib.rst","contentType":"file"},{"name":"resource.rst","path":"Doc/library/resource.rst","contentType":"file"},{"name":"rlcompleter.rst","path":"Doc/library/rlcompleter.rst","contentType":"file"},{"name":"runpy.rst","path":"Doc/library/runpy.rst","contentType":"file"},{"name":"sched.rst","path":"Doc/library/sched.rst","contentType":"file"},{"name":"secrets.rst","path":"Doc/library/secrets.rst","contentType":"file"},{"name":"security_warnings.rst","path":"Doc/library/security_warnings.rst","contentType":"file"},{"name":"select.rst","path":"Doc/library/select.rst","contentType":"file"},{"name":"selectors.rst","path":"Doc/library/selectors.rst","contentType":"file"},{"name":"shelve.rst","path":"Doc/library/shelve.rst","contentType":"file"},{"name":"shlex.rst","path":"Doc/library/shlex.rst","contentType":"file"},{"name":"shutil.rst","path":"Doc/library/shutil.rst","contentType":"file"},{"name":"signal.rst","path":"Doc/library/signal.rst","contentType":"file"},{"name":"site.rst","path":"Doc/library/site.rst","contentType":"file"},{"name":"smtpd.rst","path":"Doc/library/smtpd.rst","contentType":"file"},{"name":"smtplib.rst","path":"Doc/library/smtplib.rst","contentType":"file"},{"name":"sndhdr.rst","path":"Doc/library/sndhdr.rst","contentType":"file"},{"name":"socket.rst","path":"Doc/library/socket.rst","contentType":"file"},{"name":"socketserver.rst","path":"Doc/library/socketserver.rst","contentType":"file"},{"name":"spwd.rst","path":"Doc/library/spwd.rst","contentType":"file"},{"name":"sqlite3.rst","path":"Doc/library/sqlite3.rst","contentType":"file"},{"name":"ssl.rst","path":"Doc/library/ssl.rst","contentType":"file"},{"name":"stat.rst","path":"Doc/library/stat.rst","contentType":"file"},{"name":"statistics.rst","path":"Doc/library/statistics.rst","contentType":"file"},{"name":"stdtypes.rst","path":"Doc/library/stdtypes.rst","contentType":"file"},{"name":"string.rst","path":"Doc/library/string.rst","contentType":"file"},{"name":"stringprep.rst","path":"Doc/library/stringprep.rst","contentType":"file"},{"name":"struct.rst","path":"Doc/library/struct.rst","contentType":"file"},{"name":"subprocess.rst","path":"Doc/library/subprocess.rst","contentType":"file"},{"name":"sunau.rst","path":"Doc/library/sunau.rst","contentType":"file"},{"name":"superseded.rst","path":"Doc/library/superseded.rst","contentType":"file"},{"name":"symtable.rst","path":"Doc/library/symtable.rst","contentType":"file"},{"name":"sys.monitoring.rst","path":"Doc/library/sys.monitoring.rst","contentType":"file"},{"name":"sys.rst","path":"Doc/library/sys.rst","contentType":"file"},{"name":"sys_path_init.rst","path":"Doc/library/sys_path_init.rst","contentType":"file"},{"name":"sysconfig.rst","path":"Doc/library/sysconfig.rst","contentType":"file"},{"name":"syslog.rst","path":"Doc/library/syslog.rst","contentType":"file"},{"name":"tabnanny.rst","path":"Doc/library/tabnanny.rst","contentType":"file"},{"name":"tarfile.rst","path":"Doc/library/tarfile.rst","contentType":"file"},{"name":"telnetlib.rst","path":"Doc/library/telnetlib.rst","contentType":"file"},{"name":"tempfile.rst","path":"Doc/library/tempfile.rst","contentType":"file"},{"name":"termios.rst","path":"Doc/library/termios.rst","contentType":"file"},{"name":"test.rst","path":"Doc/library/test.rst","contentType":"file"},{"name":"text.rst","path":"Doc/library/text.rst","contentType":"file"},{"name":"textwrap.rst","path":"Doc/library/textwrap.rst","contentType":"file"},{"name":"threading.rst","path":"Doc/library/threading.rst","contentType":"file"},{"name":"time.rst","path":"Doc/library/time.rst","contentType":"file"},{"name":"timeit.rst","path":"Doc/library/timeit.rst","contentType":"file"},{"name":"tk.rst","path":"Doc/library/tk.rst","contentType":"file"},{"name":"tk_msg.png","path":"Doc/library/tk_msg.png","contentType":"file"},{"name":"tkinter.colorchooser.rst","path":"Doc/library/tkinter.colorchooser.rst","contentType":"file"},{"name":"tkinter.dnd.rst","path":"Doc/library/tkinter.dnd.rst","contentType":"file"},{"name":"tkinter.font.rst","path":"Doc/library/tkinter.font.rst","contentType":"file"},{"name":"tkinter.messagebox.rst","path":"Doc/library/tkinter.messagebox.rst","contentType":"file"},{"name":"tkinter.rst","path":"Doc/library/tkinter.rst","contentType":"file"},{"name":"tkinter.scrolledtext.rst","path":"Doc/library/tkinter.scrolledtext.rst","contentType":"file"},{"name":"tkinter.ttk.rst","path":"Doc/library/tkinter.ttk.rst","contentType":"file"},{"name":"token-list.inc","path":"Doc/library/token-list.inc","contentType":"file"},{"name":"token.rst","path":"Doc/library/token.rst","contentType":"file"},{"name":"tokenize.rst","path":"Doc/library/tokenize.rst","contentType":"file"},{"name":"tomllib.rst","path":"Doc/library/tomllib.rst","contentType":"file"},{"name":"trace.rst","path":"Doc/library/trace.rst","contentType":"file"},{"name":"traceback.rst","path":"Doc/library/traceback.rst","contentType":"file"},{"name":"tracemalloc.rst","path":"Doc/library/tracemalloc.rst","contentType":"file"},{"name":"tty.rst","path":"Doc/library/tty.rst","contentType":"file"},{"name":"tulip_coro.dia","path":"Doc/library/tulip_coro.dia","contentType":"file"},{"name":"tulip_coro.png","path":"Doc/library/tulip_coro.png","contentType":"file"},{"name":"turtle-star.pdf","path":"Doc/library/turtle-star.pdf","contentType":"file"},{"name":"turtle-star.png","path":"Doc/library/turtle-star.png","contentType":"file"},{"name":"turtle-star.ps","path":"Doc/library/turtle-star.ps","contentType":"file"},{"name":"turtle.rst","path":"Doc/library/turtle.rst","contentType":"file"},{"name":"types.rst","path":"Doc/library/types.rst","contentType":"file"},{"name":"typing.rst","path":"Doc/library/typing.rst","contentType":"file"},{"name":"unicodedata.rst","path":"Doc/library/unicodedata.rst","contentType":"file"},{"name":"unittest.mock-examples.rst","path":"Doc/library/unittest.mock-examples.rst","contentType":"file"},{"name":"unittest.mock.rst","path":"Doc/library/unittest.mock.rst","contentType":"file"},{"name":"unittest.rst","path":"Doc/library/unittest.rst","contentType":"file"},{"name":"unix.rst","path":"Doc/library/unix.rst","contentType":"file"},{"name":"urllib.error.rst","path":"Doc/library/urllib.error.rst","contentType":"file"},{"name":"urllib.parse.rst","path":"Doc/library/urllib.parse.rst","contentType":"file"},{"name":"urllib.request.rst","path":"Doc/library/urllib.request.rst","contentType":"file"},{"name":"urllib.robotparser.rst","path":"Doc/library/urllib.robotparser.rst","contentType":"file"},{"name":"urllib.rst","path":"Doc/library/urllib.rst","contentType":"file"},{"name":"uu.rst","path":"Doc/library/uu.rst","contentType":"file"},{"name":"uuid.rst","path":"Doc/library/uuid.rst","contentType":"file"},{"name":"venv.rst","path":"Doc/library/venv.rst","contentType":"file"},{"name":"warnings.rst","path":"Doc/library/warnings.rst","contentType":"file"},{"name":"wave.rst","path":"Doc/library/wave.rst","contentType":"file"},{"name":"weakref.rst","path":"Doc/library/weakref.rst","contentType":"file"},{"name":"webbrowser.rst","path":"Doc/library/webbrowser.rst","contentType":"file"},{"name":"windows.rst","path":"Doc/library/windows.rst","contentType":"file"},{"name":"winreg.rst","path":"Doc/library/winreg.rst","contentType":"file"},{"name":"winsound.rst","path":"Doc/library/winsound.rst","contentType":"file"},{"name":"wsgiref.rst","path":"Doc/library/wsgiref.rst","contentType":"file"},{"name":"xdrlib.rst","path":"Doc/library/xdrlib.rst","contentType":"file"},{"name":"xml.dom.minidom.rst","path":"Doc/library/xml.dom.minidom.rst","contentType":"file"},{"name":"xml.dom.pulldom.rst","path":"Doc/library/xml.dom.pulldom.rst","contentType":"file"},{"name":"xml.dom.rst","path":"Doc/library/xml.dom.rst","contentType":"file"},{"name":"xml.etree.elementtree.rst","path":"Doc/library/xml.etree.elementtree.rst","contentType":"file"},{"name":"xml.rst","path":"Doc/library/xml.rst","contentType":"file"},{"name":"xml.sax.handler.rst","path":"Doc/library/xml.sax.handler.rst","contentType":"file"},{"name":"xml.sax.reader.rst","path":"Doc/library/xml.sax.reader.rst","contentType":"file"},{"name":"xml.sax.rst","path":"Doc/library/xml.sax.rst","contentType":"file"},{"name":"xml.sax.utils.rst","path":"Doc/library/xml.sax.utils.rst","contentType":"file"},{"name":"xmlrpc.client.rst","path":"Doc/library/xmlrpc.client.rst","contentType":"file"},{"name":"xmlrpc.rst","path":"Doc/library/xmlrpc.rst","contentType":"file"},{"name":"xmlrpc.server.rst","path":"Doc/library/xmlrpc.server.rst","contentType":"file"},{"name":"zipapp.rst","path":"Doc/library/zipapp.rst","contentType":"file"},{"name":"zipfile.rst","path":"Doc/library/zipfile.rst","contentType":"file"},{"name":"zipimport.rst","path":"Doc/library/zipimport.rst","contentType":"file"},{"name":"zlib.rst","path":"Doc/library/zlib.rst","contentType":"file"},{"name":"zoneinfo.rst","path":"Doc/library/zoneinfo.rst","contentType":"file"}],"totalCount":335},"Doc":{"items":[{"name":"_static","path":"Doc/_static","contentType":"directory"},{"name":"c-api","path":"Doc/c-api","contentType":"directory"},{"name":"data","path":"Doc/data","contentType":"directory"},{"name":"deprecations","path":"Doc/deprecations","contentType":"directory"},{"name":"distributing","path":"Doc/distributing","contentType":"directory"},{"name":"extending","path":"Doc/extending","contentType":"directory"},{"name":"faq","path":"Doc/faq","contentType":"directory"},{"name":"howto","path":"Doc/howto","contentType":"directory"},{"name":"includes","path":"Doc/includes","contentType":"directory"},{"name":"installing","path":"Doc/installing","contentType":"directory"},{"name":"library","path":"Doc/library","contentType":"directory"},{"name":"reference","path":"Doc/reference","contentType":"directory"},{"name":"tools","path":"Doc/tools","contentType":"directory"},{"name":"tutorial","path":"Doc/tutorial","contentType":"directory"},{"name":"using","path":"Doc/using","contentType":"directory"},{"name":"whatsnew","path":"Doc/whatsnew","contentType":"directory"},{"name":".ruff.toml","path":"Doc/.ruff.toml","contentType":"file"},{"name":"Makefile","path":"Doc/Makefile","contentType":"file"},{"name":"README.rst","path":"Doc/README.rst","contentType":"file"},{"name":"about.rst","path":"Doc/about.rst","contentType":"file"},{"name":"bugs.rst","path":"Doc/bugs.rst","contentType":"file"},{"name":"conf.py","path":"Doc/conf.py","contentType":"file"},{"name":"constraints.txt","path":"Doc/constraints.txt","contentType":"file"},{"name":"contents.rst","path":"Doc/contents.rst","contentType":"file"},{"name":"copyright.rst","path":"Doc/copyright.rst","contentType":"file"},{"name":"glossary.rst","path":"Doc/glossary.rst","contentType":"file"},{"name":"license.rst","path":"Doc/license.rst","contentType":"file"},{"name":"make.bat","path":"Doc/make.bat","contentType":"file"},{"name":"requirements.txt","path":"Doc/requirements.txt","contentType":"file"}],"totalCount":29},"":{"items":[{"name":".azure-pipelines","path":".azure-pipelines","contentType":"directory"},{"name":".devcontainer","path":".devcontainer","contentType":"directory"},{"name":".github","path":".github","contentType":"directory"},{"name":"Android","path":"Android","contentType":"directory"},{"name":"Doc","path":"Doc","contentType":"directory"},{"name":"Grammar","path":"Grammar","contentType":"directory"},{"name":"Include","path":"Include","contentType":"directory"},{"name":"InternalDocs","path":"InternalDocs","contentType":"directory"},{"name":"Lib","path":"Lib","contentType":"directory"},{"name":"Mac","path":"Mac","contentType":"directory"},{"name":"Misc","path":"Misc","contentType":"directory"},{"name":"Modules","path":"Modules","contentType":"directory"},{"name":"Objects","path":"Objects","contentType":"directory"},{"name":"PC","path":"PC","contentType":"directory"},{"name":"PCbuild","path":"PCbuild","contentType":"directory"},{"name":"Parser","path":"Parser","contentType":"directory"},{"name":"Programs","path":"Programs","contentType":"directory"},{"name":"Python","path":"Python","contentType":"directory"},{"name":"Tools","path":"Tools","contentType":"directory"},{"name":"iOS","path":"iOS","contentType":"directory"},{"name":".coveragerc","path":".coveragerc","contentType":"file"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".mailmap","path":".mailmap","contentType":"file"},{"name":".pre-commit-config.yaml","path":".pre-commit-config.yaml","contentType":"file"},{"name":".readthedocs.yml","path":".readthedocs.yml","contentType":"file"},{"name":".ruff.toml","path":".ruff.toml","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"Makefile.pre.in","path":"Makefile.pre.in","contentType":"file"},{"name":"README.rst","path":"README.rst","contentType":"file"},{"name":"aclocal.m4","path":"aclocal.m4","contentType":"file"},{"name":"config.guess","path":"config.guess","contentType":"file"},{"name":"config.sub","path":"config.sub","contentType":"file"},{"name":"configure","path":"configure","contentType":"file"},{"name":"configure.ac","path":"configure.ac","contentType":"file"},{"name":"install-sh","path":"install-sh","contentType":"file"},{"name":"pyconfig.h.in","path":"pyconfig.h.in","contentType":"file"}],"totalCount":38}},"fileTreeProcessingTime":14.015550999999999,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":81598961,"defaultBranch":"main","name":"cpython","ownerLogin":"python","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2017-02-10T19:23:51.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1525981?v=4","public":true,"private":false,"isOrgOwned":true},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"main","listCacheKey":"v0:1746633766.0","canEdit":false,"refType":"branch","currentOid":"5d9c8fe3f6168785cb608dddd3010042f39bb226"},"path":"Doc/library/importlib.resources.rst","currentUser":null,"blob":{"rawLines":null,"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/python/cpython/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"importlib.resources.rst","displayUrl":"https://github.com/python/cpython/blob/main/Doc/library/importlib.resources.rst?raw=true","headerInfo":{"blobSize":"10.2 KB","deleteTool
73B9
tip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"e002198","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fblob%2Fmain%2FDoc%2Flibrary%2Fimportlib.resources.rst","isCSV":false,"isRichtext":true,"toc":[{"level":1,"text":":mod:`!importlib.resources` -- Package resource reading, opening and access","anchor":"modimportlibresources----package-resource-reading-opening-and-access","htmlText":":mod:`!importlib.resources` -- Package resource reading, opening and access"},{"level":2,"text":"Functional API","anchor":"functional-api","htmlText":"Functional API"}],"lineInfo":{"truncatedLoc":"277","truncatedSloc":"185"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"reStructuredText","languageID":419,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/python/cpython/blob/main/Doc/library/importlib.resources.rst","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/python/cpython/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/python/cpython/raw/refs/heads/main/Doc/library/importlib.resources.rst","renderImageOrRaw":false,"richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ca href=\"#id1\"\u003e\u003cspan id=\"user-content-id2\"\u003e:mod:`!importlib.resources`\u003c/span\u003e\u003c/a\u003e -- Package resource reading, opening and access\u003c/h1\u003e\u003ca id=\"user-content-modimportlibresources----package-resource-reading-opening-and-access\" class=\"anchor\" aria-label=\"Permalink: :mod:`!importlib.resources` -- Package resource reading, opening and access\" href=\"#modimportlibresources----package-resource-reading-opening-and-access\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cpre\u003e.. module:: importlib.resources\n :synopsis: Package resource reading, opening, and access\n\n\u003c/pre\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eSource code:\u003c/strong\u003e \u003ca href=\"#id3\"\u003e\u003cspan id=\"user-content-id4\"\u003e:source:`Lib/importlib/resources/__init__.py`\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e\n\u003chr\u003e\n\u003cpre\u003e.. versionadded:: 3.7\n\n\u003c/pre\u003e\n\u003cp dir=\"auto\"\u003eThis module leverages Python's import system to provide access to \u003cem\u003eresources\u003c/em\u003e\nwithin \u003cem\u003epackages\u003c/em\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\"Resources\" are file-like resources associated with a module or package in\nPython. The resources may be contained directly in a package, within a\nsubdirectory contained in that package, or adjacent to modules outside a\npackage. Resources may be text or binary. As a result, Python module sources\n(.py) of a package and compilation artifacts (pycache) are technically\nde-facto resources of that package. In practice, however, resources are\nprimarily those non-Python artifacts exposed specifically by the package\nauthor.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eResources can be opened or read in either binary or text mode.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eResources are roughly akin to files inside directories, though it's important\nto keep in mind that this is just a metaphor. Resources and packages \u003cstrong\u003edo\nnot\u003c/strong\u003e have to exist as physical files and directories on the file system:\nfor example, a package and its resources can be imported from a zip file using\n\u003ca href=\"#id5\"\u003e\u003cspan id=\"user-content-id6\"\u003e:py:mod:`zipimport`\u003c/span\u003e\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv dir=\"auto\"\u003e\n\u003cp dir=\"auto\"\u003eNote\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis module provides functionality similar to \u003ca href=\"https://setuptools.readthedocs.io/en/latest/pkg_resources.html\" rel=\"nofollow\"\u003epkg_resources\u003c/a\u003e \u003ca href=\"https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access\" rel=\"nofollow\"\u003eBasic\nResource Access\u003c/a\u003e\nwithout the performance overhead of that package. This makes reading\nresources included in packages easier, with more stable and consistent\nsemantics.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe standalone backport of this module provides more information\non \u003ca href=\"https://importlib-resources.readthedocs.io/en/latest/using.html\" rel=\"nofollow\"\u003eusing importlib.resources\u003c/a\u003e and\n\u003ca href=\"https://importlib-resources.readthedocs.io/en/latest/migration.html\" rel=\"nofollow\"\u003emigrating from pkg_resources to importlib.resources\u003c/a\u003e.\u003c/p\u003e\n\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"#id7\"\u003e\u003cspan id=\"user-content-id8\"\u003e:class:`Loaders \u0026lt;importlib.abc.Loader\u0026gt;`\u003c/span\u003e\u003c/a\u003e that wish to support resource reading should implement a\n\u003ccode\u003eget_resource_reader(fullname)\u003c/code\u003e method as specified by\n\u003ca href=\"#id9\"\u003e\u003cspan id=\"user-content-id10\"\u003e:class:`importlib.resources.abc.ResourceReader`\u003c/span\u003e\u003c/a\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eRepresents an anchor for resources, either a \u003ca href=\"#id11\"\u003e\u003cspan id=\"user-content-id12\"\u003e:class:`module object\n\u0026lt;types.ModuleType\u0026gt;`\u003c/span\u003e\u003c/a\u003e or a module name as a string. Defined as\n\u003ccode\u003eUnion[str, ModuleType]\u003c/code\u003e.\u003c/p\u003e\n\u003cpre\u003e.. function:: files(anchor: Optional[Anchor] = None)\n\n Returns a :class:`~importlib.resources.abc.Traversable` object\n representing the resource container (think directory) and its resources\n (think files). A Traversable may contain other containers (think\n subdirectories).\n\n *anchor* is an optional :class:`Anchor`. If the anchor is a\n package, resources are resolved from that package. If a module,\n resources are resolved adjacent to that module (in the same package\n or the package root). If the anchor is omitted, the caller's module\n is used.\n\n .. versionadded:: 3.9\n\n .. versionchanged:: 3.12\n *package* parameter was renamed to *anchor*. *anchor* can now\n be a non-package module and if omitted will default to the caller's\n module. *package* is still accepted for compatibility but will raise\n a :exc:`DeprecationWarning`. Consider passing the anchor positionally or\n using ``importlib_resources \u0026gt;= 5.10`` for a compatible interface\n on older Pythons.\n\n\u003c/pre\u003e\n\u003cpre\u003e.. function:: as_file(traversable)\n\n Given a :class:`~importlib.resources.abc.Traversable` object representing\n a file or directory, typically from :func:`importlib.resources.files`,\n return a context manager for use in a :keyword:`with` statement.\n The context manager provides a :class:`pathlib.Path` object.\n\n Exiting the context manager cleans up any temporary file or directory\n created when the resource was extracted from e.g. a zip file.\n\n Use ``as_file`` when the Traversable methods\n (``read_text``, etc) are insufficient and an actual file or directory on\n the file system is required.\n\n .. versionadded:: 3.9\n\n .. versionchanged:: 3.12\n Added support for *traversable* representing a directory.\n\n\n\u003c/pre\u003e\n\u003ca name=\"user-content-functional-api\"\u003e\u003c/a\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eFunctional API\u003c/h2\u003e\u003ca id=\"user-content-functional-api\" class=\"anchor\" aria-label=\"Permalink: Functional API\" href=\"#functional-api\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eA set of simplified, backwards-compatible helpers is available.\nThese allow common operations in a single function call.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor all the following functions:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003cp dir=\"auto\"\u003e\u003cem\u003eanchor\u003c/em\u003e is an \u003ca href=\"#id13\"\u003e\u003cspan id=\"user-content-id14\"\u003e:class:`~importlib.resources.Anchor`\u003c/span\u003e\u003c/a\u003e,\nas in \u003ca href=\"#id15\"\u003e\u003cspan id=\"user-content-id16\"\u003e:func:`~importlib.resources.files`\u003c/span\u003e\u003c/a\u003e.\nUnlike in \u003ccode\u003efiles\u003c/code\u003e, it may not be omitted.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cp dir=\"auto\"\u003e\u003cem\u003epath_names\u003c/em\u003e are components of a resource's path name, relative to\nthe anchor.\nFor example, to get the text of resource named \u003ccode\u003einfo.txt\u003c/code\u003e, use:\u003c/p\u003e\n\u003cpre\u003eimportlib.resources.read_text(my_module, \"info.txt\")\n\u003c/pre\u003e\n\u003cp dir=\"auto\"\u003eLike \u003ca href=\"#id17\"\u003e\u003cspan id=\"user-content-id18\"\u003e:meth:`Traversable.joinpath \u0026lt;importlib.resources.abc.Traversable\u0026gt;`\u003c/span\u003e\u003c/a\u003e,\nThe individual components should use forward slashes (\u003ccode\u003e/\u003c/code\u003e)\nas path separators.\nFor example, the following are equivalent:\u003c/p\u003e\n\u003cpre\u003eimportlib.resources.read_binary(my_module, \"pics/painting.png\")\nimportlib.resources.read_binary(my_module, \"pics\", \"painting.png\")\n\u003c/pre\u003e\n\u003cp dir=\"auto\"\u003eFor backward compatibility reasons, functions that read text require\nan explicit \u003cem\u003eencoding\u003c/em\u003e argument if multiple \u003cem\u003epath_names\u003c/em\u003e are given.\nFor example, to get the text of \u003ccode\u003einfo/chapter1.txt\u003c/code\u003e, use:\u003c/p\u003e\n\u003cpre\u003eimportlib.resources.read_text(my_module, \"info\", \"chapter1.txt\",\n encoding='utf-8')\n\u003c/pre\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e.. function:: open_binary(anchor, *path_names)\n\n Open the named resource for binary reading.\n\n See :ref:`the introduction \u0026lt;importlib_resources_functional\u0026gt;` for\n details on *anchor* and *path_names*.\n\n This function returns a :class:`~typing.BinaryIO` object,\n that is, a binary stream open for reading.\n\n This function is roughly equivalent to::\n\n files(anchor).joinpath(*path_names).open('rb')\n\n .. versionchanged:: 3.13\n Multiple *path_names* are accepted.\n\n\n\u003c/pre\u003e\n\u003cpre\u003e.. function:: open_text(anchor, *path_names, encoding='utf-8', errors='strict')\n\n Open the named resource for text reading.\n By default, the contents are read as strict UTF-8.\n\n See :ref:`the introduction \u0026lt;importlib_resources_functional\u0026gt;` for\n details on *anchor* and *path_names*.\n *encoding* and *errors* have the same meaning as in built-in :func:`open`.\n\n For backward compatibility reasons, the *encoding* argument must be given\n explicitly if there are multiple *path_names*.\n This limitation is scheduled to be removed in Python 3.15.\n\n This function returns a :class:`~typing.TextIO` object,\n that is, a text stream open for reading.\n\n This function is roughly equivalent to::\n\n files(anchor).joinpath(*path_names).open('r', encoding=encoding)\n\n .. versionchanged:: 3.13\n Multiple *path_names* are accepted.\n *encoding* and *errors* must be given as keyword arguments.\n\n\n\u003c/pre\u003e\n\u003cpre\u003e.. function:: read_binary(anchor, *path_names)\n\n Read and return the contents of the named resource as :class:`bytes`.\n\n See :ref:`the introduction \u0026lt;importlib_resources_functional\u0026gt;` for\n details on *anchor* and *path_names*.\n\n This function is roughly equivalent to::\n\n files(anchor).joinpath(*path_names).read_bytes()\n\n .. versionchanged:: 3.13\n Multiple *path_names* are accepted.\n\n\n\u003c/pre\u003e\n\u003cpre\u003e.. function:: read_text(anchor, *path_names, encoding='utf-8', errors='strict')\n\n Read and return the contents of the named resource as :class:`str`.\n By default, the contents are read as strict UTF-8.\n\n See :ref:`the introduction \u0026lt;importlib_resources_functional\u0026gt;` for\n details on *anchor* and *path_names*.\n *encoding* and *errors* have the same meaning as in built-in :func:`open`.\n\n For backward compatibility reasons, the *encoding* argument must be given\n explicitly if there are multiple *path_names*.\n This limitation is scheduled to be removed in Python 3.15.\n\n This function is roughly equivalent to::\n\n files(anchor).joinpath(*path_names).read_text(encoding=encoding)\n\n .. versionchanged:: 3.13\n Multiple *path_names* are accepted.\n *encoding* and *errors* must be given as keyword arguments.\n\n\n\u003c/pre\u003e\n\u003cpre\u003e.. function:: path(anchor, *path_names)\n\n Provides the path to the *resource* as an actual file system path. This\n function returns a context manager for use in a :keyword:`with` statement.\n The context manager provides a :class:`pathlib.Path` object.\n\n Exiting the context manager cleans up any temporary files created, e.g.\n when the resource needs to be extracted from a zip file.\n\n For example, the :meth:`~pathlib.Path.stat` method requires\n an actual file system path; it can be used like this::\n\n with importlib.resources.path(anchor, \"resource.txt\") as fspath:\n result = fspath.stat()\n\n See :ref:`the introduction \u0026lt;importlib_resources_functional\u0026gt;` for\n details on *anchor* and *path_names*.\n\n This function is roughly equivalent to::\n\n as_file(files(anchor).joinpath(*path_names))\n\n .. versionchanged:: 3.13\n Multiple *path_names* are accepted.\n *encoding* and *errors* must be given as keyword arguments.\n\n\n\u003c/pre\u003e\n\u003cpre\u003e.. function:: is_resource(anchor, *path_names)\n\n Return ``True`` if the named resource exists, otherwise ``False``.\n This function does not consider directories to be resources.\n\n See :ref:`the introduction \u0026lt;importlib_resources_functional\u0026gt;` for\n details on *anchor* and *path_names*.\n\n This function is roughly equivalent to::\n\n files(anchor).joinpath(*path_names).is_file()\n\n .. versionchanged:: 3.13\n Multiple *path_names* are accepted.\n\n\n\u003c/pre\u003e\n\u003cpre\u003e.. function:: contents(anchor, *path_names)\n\n Return an iterable over the named items within the package or path.\n The iterable returns names of resources (e.g. files) and non-resources\n (e.g. directories) as :class:`str`.\n The iterable does not recurse into subdirectories.\n\n See :ref:`the introduction \u0026lt;importlib_resources_functional\u0026gt;` for\n details on *anchor* and *path_names*.\n\n This function is roughly equivalent to::\n\n for resource in files(anchor).joinpath(*path_names).iterdir():\n yield resource.name\n\n .. deprecated:: 3.11\n Prefer ``iterdir()`` as above, which offers more control over the\n results and richer functionality.\n\u003c/pre\u003e\n\n\u003c/article\u003e","renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":"/python/.github/blob/5a0a7cb55767fb3667fe2391bcb66bda638edcb4/FUNDING.yml","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":true,"symbols":[]}},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/python/cpython/branches":{"post":"8Ys8kwCZ8yxn_LBlSmNwS5d1_tyzLw4Plk2PhX-P24GtVnWI9lWSNTf8wEhV86UCNngQ4BhvjUQ1X5bQQEcZSQ"},"/repos/preferences":{"post":"uuQDU6-biraUjUy6GZCFtkX2MLHLT3nHk2L3E1YmoBKqwIab3YIvd3luunAUGy6c0JQiU4D78dCqfyAaOKdSjA"}}},"title":"cpython/Doc/library/importlib.resources.rst at main · python/cpython","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1ae9fa256942.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}