Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d8d9da04
Kaydet (Commit)
d8d9da04
authored
Kas 02, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #28513: Documented command-line interface of zipfile.
üst
93f26f79
92c1a904
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
zipfile.rst
Doc/library/zipfile.rst
+56
-0
NEWS
Misc/NEWS
+5
-0
No files found.
Doc/library/zipfile.rst
Dosyayı görüntüle @
d8d9da04
...
@@ -632,4 +632,60 @@ Instances have the following methods and attributes:
...
@@ -632,4 +632,60 @@ Instances have the following methods and attributes:
Size of the uncompressed file.
Size of the uncompressed file.
.. _zipfile-commandline:
.. program:: zipfile
Command-Line Interface
----------------------
The :mod:`zipfile` module provides a simple command-line interface to interact
with ZIP archives.
If you want to create a new ZIP archive, specify its name after the :option:`-c`
option and then list the filename(s) that should be included:
.. code-block:: shell-session
$ python -m zipfile -c monty.zip spam.txt eggs.txt
Passing a directory is also acceptable:
.. code-block:: shell-session
$ python -m zipfile -c monty.zip life-of-brian_1979/
If you want to extract a ZIP archive into the specified directory, use
the :option:`-e` option:
.. code-block:: shell-session
$ python -m zipfile -e monty.zip target-dir/
For a list of the files in a ZIP archive, use the :option:`-l` option:
.. code-block:: shell-session
$ python -m zipfile -l monty.zip
Command-line options
~~~~~~~~~~~~~~~~~~~~
.. cmdoption:: -l <zipfile>
List files in a zipfile.
.. cmdoption:: -c <zipfile> <source1> ... <sourceN>
Create zipfile from source files.
.. cmdoption:: -e <zipfile> <output_dir>
Extract zipfile into target directory.
.. cmdoption:: -t <zipfile>
Test whether the zipfile is valid or not.
.. _PKZIP Application Note: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
.. _PKZIP Application Note: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
Misc/NEWS
Dosyayı görüntüle @
d8d9da04
...
@@ -16,6 +16,11 @@ Core and Builtins
...
@@ -16,6 +16,11 @@ Core and Builtins
Library
Library
-------
-------
Documentation
-------------
-
Issue
#
28513
:
Documented
command
-
line
interface
of
zipfile
.
What
's New in Python 3.6.0 beta 3
What
's New in Python 3.6.0 beta 3
=================================
=================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment