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
177177
178178.. code-block :: shell-session
179179
180- $ unzip -l example .zip
181- Archive: example .zip
180+ $ unzip -l example_archive .zip
181+ Archive: example_archive .zip
182182 Length Date Time Name
183183 -------- ---- ---- ----
184- 8467 11-26-02 22 :30 jwzthreading .py
184+ 8467 01-01-00 12 :30 example .py
185185 -------- -------
186186 8467 1 file
187- $ ./python
188- Python 2.3 (#1, Aug 1 2003, 19:54:32)
187+
188+ .. code-block :: pycon
189+
189190 >>> 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