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
e35360ff
Kaydet (Commit)
e35360ff
authored
Eki 03, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Jim Ahlstrom sent a few corrections to my changes. (Thanks!)
üst
51914632
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
20 deletions
+27
-20
libzipfile.tex
Doc/lib/libzipfile.tex
+27
-20
No files found.
Doc/lib/libzipfile.tex
Dosyayı görüntüle @
e35360ff
...
@@ -25,10 +25,6 @@ The available attributes of this module are:
...
@@ -25,10 +25,6 @@ The available attributes of this module are:
The error raised for bad ZIP files.
The error raised for bad ZIP files.
\end{excdesc}
\end{excdesc}
\begin{datadesc}
{_
debug
}
Level of printing, defaults to
\code
{
1
}
.
\end{datadesc}
\begin{classdesc}
{
ZipFile
}{
\unspecified
}
\begin{classdesc}
{
ZipFile
}{
\unspecified
}
The class for reading and writing ZIP files. See
The class for reading and writing ZIP files. See
``
\citetitle
{
ZipFile Objects
}
'' (section
\ref
{
zipfile-objects
}
) for
``
\citetitle
{
ZipFile Objects
}
'' (section
\ref
{
zipfile-objects
}
) for
...
@@ -42,7 +38,7 @@ The available attributes of this module are:
...
@@ -42,7 +38,7 @@ The available attributes of this module are:
\begin{classdesc}
{
ZipInfo
}{
\optional
{
filename
\optional
{
, date
_
time
}}}
\begin{classdesc}
{
ZipInfo
}{
\optional
{
filename
\optional
{
, date
_
time
}}}
Class used the represent infomation about a member of an archive.
Class used the represent infomation about a member of an archive.
Instances of this class are returned by the
\method
{
getinfo()
}
and
Instances of this class are returned by the
\method
{
getinfo()
}
and
\method
{
listinfo
()
}
methods of
\class
{
ZipFile
}
objects. Most users
\method
{
infolist
()
}
methods of
\class
{
ZipFile
}
objects. Most users
of the
\module
{
zipfile
}
module will not need to create these, but
of the
\module
{
zipfile
}
module will not need to create these, but
only use those created by this module.
only use those created by this module.
\var
{
filename
}
should be the full name of the archive member, and
\var
{
filename
}
should be the full name of the archive member, and
...
@@ -99,10 +95,22 @@ cat myzip.zip >> python.exe
...
@@ -99,10 +95,22 @@ cat myzip.zip >> python.exe
\var
{
compression
}
is the ZIP compression method to use when writing
\var
{
compression
}
is the ZIP compression method to use when writing
the archive, and should be
\constant
{
ZIP
_
STORED
}
or
the archive, and should be
\constant
{
ZIP
_
STORED
}
or
\constant
{
ZIP
_
DEFLATED
}
; unrecognized values will cause
\constant
{
ZIP
_
DEFLATED
}
; unrecognized values will cause
\exception
{
ValueError
}
to be raised. The default is
\exception
{
RuntimeError
}
to be raised. If
\constant
{
ZIP
_
DEFLATED
}
is specified but the
\refmodule
{
zlib
}
module is not avaialble,
\exception
{
RuntimeError
}
is also raised. The default is
\constant
{
ZIP
_
STORED
}
.
\constant
{
ZIP
_
STORED
}
.
\end{classdesc}
\end{classdesc}
\begin{methoddesc}
{
close
}{}
Close the archive file. You must call
\method
{
close()
}
before
exiting your program or essential records will not be written.
\end{methoddesc}
\begin{methoddesc}
{
getinfo
}{
name
}
Return a
\class
{
ZipInfo
}
object with information about the archive
member
\var
{
name
}
.
\end{methoddesc}
\begin{methoddesc}
{
namelist
}{}
\begin{methoddesc}
{
namelist
}{}
Return a list of archive members by name.
Return a list of archive members by name.
\end{methoddesc}
\end{methoddesc}
...
@@ -127,22 +135,21 @@ cat myzip.zip >> python.exe
...
@@ -127,22 +135,21 @@ cat myzip.zip >> python.exe
name of the first bad file, or else return
\code
{
None
}
.
name of the first bad file, or else return
\code
{
None
}
.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
writestr
}{
bytes, arcname, year, month, day,
\begin{methoddesc}
{
write
}{
filename
\optional
{
, arcname
\optional
{
,
hour, minute, second
}
compress
_
type
}}}
Write the string
\var
{
bytes
}
and the other data to the archive, and
give the archive member the name
\var
{
arcname
}
. The archive must be
opened with mode
\code
{
'w'
}
or
\code
{
'a'
}
.
\end{methoddesc}
\begin{methoddesc}
{
write
}{
filename, arcname
}
Write the file named
\var
{
filename
}
to the archive, giving it the
Write the file named
\var
{
filename
}
to the archive, giving it the
archive name
\var
{
arcname
}
. The archive must be open with mode
archive name
\var
{
arcname
}
(by default, this will be the same as
\code
{
'w'
}
or
\code
{
'a'
}
.
\var
{
filename
}
). If given,
\var
{
compress
_
type
}
overrides the value
given for the
\var
{
compression
}
parameter to the constructor for
the new entry. The archive must be open with mode
\code
{
'w'
}
or
\code
{
'a'
}
.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
close
}{}
\begin{methoddesc}
{
writestr
}{
zinfo, bytes
}
Close the archive file. You must call
\method
{
close()
}
before
Write the string
\var
{
bytes
}
to the archive; meta-information is
exiting your program or essential records will not be written.
given as the
\class
{
ZipInfo
}
instance
\var
{
zinfo
}
. At least the
filename, date, and time must be given by
\var
{
zinfo
}
. The archive
must be opened with mode
\code
{
'w'
}
or
\code
{
'a'
}
.
\end{methoddesc}
\end{methoddesc}
...
@@ -189,7 +196,7 @@ those of \class{ZipFile} objects.
...
@@ -189,7 +196,7 @@ those of \class{ZipFile} objects.
\subsection
{
ZipInfo Objects
\label
{
zipinfo-objects
}}
\subsection
{
ZipInfo Objects
\label
{
zipinfo-objects
}}
Instances of the
\class
{
ZipInfo
}
class are returned by the
Instances of the
\class
{
ZipInfo
}
class are returned by the
\method
{
getinfo()
}
and
\method
{
listinfo
()
}
methods of
\method
{
getinfo()
}
and
\method
{
infolist
()
}
methods of
\class
{
ZipFile
}
objects. Each object stores information about a
\class
{
ZipFile
}
objects. Each object stores information about a
single member of the ZIP archive.
single member of the ZIP archive.
...
...
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