Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-133829: Update zipimport example to not be from Python 2#133835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
sharktide wants to merge12 commits intopython:mainChoose a base branch fromsharktide:patch-133829
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+12 −9
Open
Changes fromall commits
Commits
Show all changes
12 commits Select commitHold shift + click to select a range
842443e
gh-133829 Update zipimport example to use pip.pyz
sharktide38d41ad
gh-133829 Under request, break up example into 2 code blocks
sharktide93da900
gh-133829 remove $ ./python marker in python codeblock
sharktide72ff028
agh-130829 simplify example
sharktide0b5e2a5
gh-133829 Update example to use ``example.zip`` ``example.py`` and ``…
sharktide24788eb
gh-133829 Clarify filename of zip to ``example_archive.zip``
sharktideb8eccf7
Update zipimport.rst
sharktidee7c93b9
Fix test fails
sharktideb224d43
Update Doc/library/zipimport.rst
sobolevncff42fa
Update Doc/library/zipimport.rst
sobolevndc21001
Update Doc/library/zipimport.rst
sharktide548857f
Update Doc/library/zipimport.rst
sharktideFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -188,17 +188,20 @@ Here is an example that imports a module from a ZIP archive - note that the | ||
.. code-block:: shell-session | ||
sobolevn marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
$ unzip -lexample_archive.zip | ||
sobolevn marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
Archive:example_archive.zip | ||
Length Date Time Name | ||
-------- ---- ---- ---- | ||
846705-11-25 12:29example.py | ||
sharktide marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
-------- ------- | ||
8467 1 file | ||
.. code-block:: pycon | ||
>>> import sys | ||
>>> # Add the archive to the front of the module search path | ||
>>> sys.path.insert(0, 'example_archive.zip') | ||
>>> import example | ||
>>> example.__file__ | ||
'example_archive.zip/example.py' | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.