File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed 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
188
188
189
189
.. code-block :: shell-session
190
190
191
- $ unzip -l example .zip
192
- Archive: example .zip
191
+ $ unzip -l example_archive .zip
192
+ Archive: example_archive .zip
193
193
Length Date Time Name
194
194
-------- ---- ---- ----
195
- 8467 11-26-02 22 :30 jwzthreading .py
195
+ 8467 01-01-00 12 :30 example .py
196
196
-------- -------
197
197
8467 1 file
198
- $ ./python
199
- Python 2.3 (#1, Aug 1 2003, 19:54:32)
198
+
199
+ .. code-block :: pycon
200
+
200
201
>>> 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'
202
+ >>> # Add the archive to the front of the module search path
203
+ >>> sys.path.insert(0, 'example_archive.zip')
204
+ >>> import example
205
+ >>> example.__file__
206
+ 'example_archive.zip/example.py'
207
+
You can’t perform that action at this time.
0 commit comments