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 @@ -177,17 +177,20 @@ Here is an example that imports a module from a ZIP archive - note that the
177
177
178
178
.. code-block :: shell-session
179
179
180
- $ unzip -l example .zip
181
- Archive: example .zip
180
+ $ unzip -l example_archive .zip
181
+ Archive: example_archive .zip
182
182
Length Date Time Name
183
183
-------- ---- ---- ----
184
- 8467 11-26-02 22 :30 jwzthreading .py
184
+ 8467 01-01-00 12 :30 example .py
185
185
-------- -------
186
186
8467 1 file
187
- $ ./python
188
- Python 2.3 (#1, Aug 1 2003, 19:54:32)
187
+
188
+ .. code-block :: pycon
189
+
189
190
>>> import sys
190
- >>> sys.path.insert(0, 'example.zip') # Add .zip file to front of path
191
- >>> import jwzthreading
192
- >>> jwzthreading.__file__
193
- 'example.zip/jwzthreading.py'
191
+ >>> # Add the archive to the front of the module search path
192
+ >>> sys.path.insert(0, 'example_archive.zip')
193
+ >>> import example
194
+ >>> example.__file__
195
+ 'example_archive.zip/example.py'
196
+
You can’t perform that action at this time.
0 commit comments