Skip to content

Commit 24788eb

Browse files
authored
gh-133829 Clarify filename of zip to example_archive.zip
1 parent 0b5e2a5 commit 24788eb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Doc/library/zipimport.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,20 @@ Examples
186186
Here is an example that imports a module from a ZIP archive - note that the
187187
:mod:`zipimport` module is not explicitly used.
188188

189+
.. code-block:: shell-session
190+
$ unzip -l example_archive.zip
191+
Archive: example.zip
192+
Length Date Time Name
193+
-------- ---- ---- ----
194+
8467 05-11-25 12:29 example.py
195+
-------- -------
196+
8467 1 file
197+
189198
.. code-block:: python
190199
191200
>>> import sys
192-
>>> sys.path.insert(0, 'example.zip') # Add .zip file to front of path
201+
>>> sys.path.insert(0, 'example_archive.zip') # Add .zip file to front of path
193202
>>> import example
194203
>>> example.__file__
195-
'example.zip/example/__main__.py'
204+
'example.zip/example.py'
196205

0 commit comments

Comments
 (0)