mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.13] gh-133829: Remove some specifics from the `zipimport` example (GH-133835) (#138273)
Some checks are pending
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Some checks are pending
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Co-authored-by: R Chintan Meher <meherrihaan@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
parent
8dd027602d
commit
6d2958583e
1 changed files with 12 additions and 9 deletions
|
|
@ -188,17 +188,20 @@ Here is an example that imports a module from a ZIP archive - note that the
|
|||
|
||||
.. code-block:: shell-session
|
||||
|
||||
$ unzip -l example.zip
|
||||
Archive: example.zip
|
||||
$ unzip -l example_archive.zip
|
||||
Archive: example_archive.zip
|
||||
Length Date Time Name
|
||||
-------- ---- ---- ----
|
||||
8467 11-26-02 22:30 jwzthreading.py
|
||||
8467 01-01-00 12:30 example.py
|
||||
-------- -------
|
||||
8467 1 file
|
||||
$ ./python
|
||||
Python 2.3 (#1, Aug 1 2003, 19:54:32)
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> import sys
|
||||
>>> sys.path.insert(0, 'example.zip') # Add .zip file to front of path
|
||||
>>> import jwzthreading
|
||||
>>> jwzthreading.__file__
|
||||
'example.zip/jwzthreading.py'
|
||||
>>> # 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'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue