File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ since only file are allowed as resources, file names in the
2121``importlib_resources `` API may *not * include path separators (e.g. slashes).
2222
2323
24- resource_filename()
25- ===================
24+ `` pkg_resources. resource_filename()``
25+ =====================================
2626
2727``resource_filename() `` is one of the more interesting APIs because it
2828guarantees that the return value names a file on the file system. This means
@@ -72,8 +72,8 @@ Assuming your Python interpreter exits gracefully, the temporary file will be
7272cleaned up when Python exits.
7373
7474
75- resource_stream()
76- =================
75+ `` pkg_resources. resource_stream()``
76+ ===================================
7777
7878``pkg_resources.resource_stream() `` returns a readable file-like object opened
7979in binary mode. When you read from the returned file-like object, you get
@@ -88,8 +88,8 @@ The equivalent code in ``importlib_resources`` is pretty straightforward::
8888 my_bytes = fp.read()
8989
9090
91- resource_string()
92- =================
91+ `` pkg_resources. resource_string()``
92+ ===================================
9393
9494In Python 2, ``pkg_resources.resource_string() `` returns the contents of a
9595resource as a ``str ``. In Python 3, this function is a misnomer; it actually
You can’t perform that action at this time.
0 commit comments