Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
87731870
Commit
87731870
authored
Oct 13, 2016
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue28438 - Fix the link for pkgutil.get_data doc. Patch contributed by Xiang Zhang.
parent
ad27c3b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Doc/library/pkgutil.rst
Doc/library/pkgutil.rst
+4
-2
No files found.
Doc/library/pkgutil.rst
View file @
87731870
...
@@ -201,7 +201,8 @@ support.
...
@@ -201,7 +201,8 @@ support.
Get a resource from a package.
Get a resource from a package.
This is a wrapper for the :term:`loader` :func:`get_data` API. The
This is a wrapper for the :term:`loader`
:meth:`get_data <importlib.abc.ResourceLoader.get_data>` API. The
*package* argument should be the name of a package, in standard module format
*package* argument should be the name of a package, in standard module format
(``foo.bar``). The *resource* argument should be in the form of a relative
(``foo.bar``). The *resource* argument should be in the form of a relative
filename, using ``/`` as the path separator. The parent directory name
filename, using ``/`` as the path separator. The parent directory name
...
@@ -217,4 +218,5 @@ support.
...
@@ -217,4 +218,5 @@ support.
data = open(os.path.join(d, resource), '
rb
').read()
data = open(os.path.join(d, resource), '
rb
').read()
If the package cannot be located or loaded, or it uses a :term:`loader`
If the package cannot be located or loaded, or it uses a :term:`loader`
which does not support :func:`get_data`, then ``None`` is returned.
which does not support :meth:`get_data <importlib.abc.ResourceLoader.get_data>`,
then ``None`` is returned.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment