<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
<link rel=
"STYLESHEET" href=
"lib.css" type='text/css'
/>
<link rel=
"SHORTCUT ICON" href=
"../icons/pyfav.png" type=
"image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index'
/>
<link rel=
"first" href=
"lib.html" title='Python Library Reference'
/>
<link rel='contents' href='contents.html'
title=
"Contents" />
<link rel='index' href='genindex.html' title='Index'
/>
<link rel='last' href='about.html' title='About this document...'
/>
<link rel='help' href='about.html' title='About this document...'
/>
<link rel=
"prev" href=
"pyzipfile-objects.html" />
<link rel=
"parent" href=
"module-zipfile.html" />
<link rel=
"next" href=
"module-tarfile.html" />
<meta name='aesop' content='information'
/>
<title>7.18.3 ZipInfo Objects
</title>
<div id='top-navigation-panel' xml:id='top-navigation-panel'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"7.18.2 PyZipFile Objects"
href=
"pyzipfile-objects.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"7.18 zipfile "
href=
"module-zipfile.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"7.19 tarfile "
href=
"module-tarfile.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Python Library Reference
</td>
<td class='online-navigation'
><a rel=
"contents" title=
"Table of Contents"
href=
"contents.html"><img src='../icons/contents.png'
border='
0' height='
32' alt='Contents' width='
32'
/></A></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"pyzipfile-objects.html">7.18.2 PyZipFile Objects
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"module-zipfile.html">7.18 zipfile
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"module-tarfile.html">7.19 tarfile
</A>
<!--End of Navigation Panel-->
<H2><A NAME=
"SECTION0091830000000000000000"></A><A NAME=
"zipinfo-objects"></A>
Instances of the
<tt class=
"class">ZipInfo
</tt> class are returned by the
<tt class=
"method">getinfo()
</tt> and
<tt class=
"method">infolist()
</tt> methods of
<tt class=
"class">ZipFile
</tt> objects. Each object stores information about a
single member of the ZIP archive.
Instances have the following attributes:
<dl><dt><b><tt id='l2h-
2870' xml:id='l2h-
2870'
class=
"member">filename
</tt></b></dt>
Name of the file in the archive.
<dl><dt><b><tt id='l2h-
2871' xml:id='l2h-
2871'
class=
"member">date_time
</tt></b></dt>
The time and date of the last modification to the archive
member. This is a tuple of six values:
<div class=
"center"><table class=
"realtable">
<th class=
"center">Index
</th>
<th class=
"left" >Value
</th>
<tr><td class=
"center" valign=
"baseline"><code>0</code></td>
<td class=
"left" >Year
</td></tr>
<tr><td class=
"center" valign=
"baseline"><code>1</code></td>
<td class=
"left" >Month (one-based)
</td></tr>
<tr><td class=
"center" valign=
"baseline"><code>2</code></td>
<td class=
"left" >Day of month (one-based)
</td></tr>
<tr><td class=
"center" valign=
"baseline"><code>3</code></td>
<td class=
"left" >Hours (zero-based)
</td></tr>
<tr><td class=
"center" valign=
"baseline"><code>4</code></td>
<td class=
"left" >Minutes (zero-based)
</td></tr>
<tr><td class=
"center" valign=
"baseline"><code>5</code></td>
<td class=
"left" >Seconds (zero-based)
</td></tr></tbody>
<dl><dt><b><tt id='l2h-
2872' xml:id='l2h-
2872'
class=
"member">compress_type
</tt></b></dt>
Type of compression for the archive member.
<dl><dt><b><tt id='l2h-
2873' xml:id='l2h-
2873'
class=
"member">comment
</tt></b></dt>
Comment for the individual archive member.
<dl><dt><b><tt id='l2h-
2874' xml:id='l2h-
2874'
class=
"member">extra
</tt></b></dt>
Expansion field data. The
href=
"http://www.pkware.com/appnote.html"
Note
</a></em> contains some comments on the internal structure of the data
contained in this string.
<dl><dt><b><tt id='l2h-
2875' xml:id='l2h-
2875'
class=
"member">create_system
</tt></b></dt>
System which created ZIP archive.
<dl><dt><b><tt id='l2h-
2876' xml:id='l2h-
2876'
class=
"member">create_version
</tt></b></dt>
PKZIP version which created ZIP archive.
<dl><dt><b><tt id='l2h-
2877' xml:id='l2h-
2877'
class=
"member">extract_version
</tt></b></dt>
PKZIP version needed to extract archive.
<dl><dt><b><tt id='l2h-
2878' xml:id='l2h-
2878'
class=
"member">reserved
</tt></b></dt>
<dl><dt><b><tt id='l2h-
2879' xml:id='l2h-
2879'
class=
"member">flag_bits
</tt></b></dt>
<dl><dt><b><tt id='l2h-
2880' xml:id='l2h-
2880'
class=
"member">volume
</tt></b></dt>
Volume number of file header.
<dl><dt><b><tt id='l2h-
2881' xml:id='l2h-
2881'
class=
"member">internal_attr
</tt></b></dt>
<dl><dt><b><tt id='l2h-
2882' xml:id='l2h-
2882'
class=
"member">external_attr
</tt></b></dt>
External file attributes.
<dl><dt><b><tt id='l2h-
2883' xml:id='l2h-
2883'
class=
"member">header_offset
</tt></b></dt>
Byte offset to the file header.
<dl><dt><b><tt id='l2h-
2884' xml:id='l2h-
2884'
class=
"member">file_offset
</tt></b></dt>
Byte offset to the start of the file data.
<dl><dt><b><tt id='l2h-
2885' xml:id='l2h-
2885'
class=
"member">CRC
</tt></b></dt>
CRC-
32 of the uncompressed file.
<dl><dt><b><tt id='l2h-
2886' xml:id='l2h-
2886'
class=
"member">compress_size
</tt></b></dt>
Size of the compressed data.
<dl><dt><b><tt id='l2h-
2887' xml:id='l2h-
2887'
class=
"member">file_size
</tt></b></dt>
Size of the uncompressed file.
<div class='online-navigation'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"7.18.2 PyZipFile Objects"
href=
"pyzipfile-objects.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"7.18 zipfile "
href=
"module-zipfile.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"7.19 tarfile "
href=
"module-tarfile.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Python Library Reference
</td>
<td class='online-navigation'
><a rel=
"contents" title=
"Table of Contents"
href=
"contents.html"><img src='../icons/contents.png'
border='
0' height='
32' alt='Contents' width='
32'
/></A></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"pyzipfile-objects.html">7.18.2 PyZipFile Objects
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"module-zipfile.html">7.18 zipfile
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"module-tarfile.html">7.19 tarfile
</A>
<span class=
"release-info">Release
2.4.2, documentation updated on
28 September
2005.
</span>
<!--End of Navigation Panel-->
See
<i><a href=
"about.html">About this document...
</a></i> for information on suggesting changes.