Skip to content

Commit 842443e

Browse files
authored
gh-133829 Update zipimport example to use pip.pyz
1 parent e7741dd commit 842443e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Doc/library/zipimport.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,17 +188,18 @@ Here is an example that imports a module from a ZIP archive - note that the
188188

189189
.. code-block:: shell-session
190190
191-
$ unzip -l example.zip
192-
Archive: example.zip
191+
$ unzip -l pip.pyz
192+
Archive: pip.pyz
193193
Length Date Time Name
194194
-------- ---- ---- ----
195-
8467 11-26-02 22:30 jwzthreading.py
195+
32145 05-10-25 10:00 pip/__main__.py
196196
-------- -------
197-
8467 1 file
197+
32145 1 file
198198
$ ./python
199-
Python 2.3 (#1, Aug 1 2003, 19:54:32)
199+
Python 3.x
200200
>>> import sys
201-
>>> sys.path.insert(0, 'example.zip') # Add .zip file to front of path
202-
>>> import jwzthreading
203-
>>> jwzthreading.__file__
204-
'example.zip/jwzthreading.py'
201+
>>> sys.path.insert(0, 'pip.pyz') # Add .pyz file to front of path
202+
>>> import pip
203+
>>> pip.__file__
204+
'pip.pyz/pip/__main__.py'
205+

0 commit comments

Comments
 (0)