[Python-bugs-list] [ python-Bugs-453208 ] 64-bit zip problems
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 04 Sep 2001 12:51:31 -0700
Bugs item #453208, was opened at 2001-08-19 22:35
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=453208&group_id=5470
Category: None
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Tim Peters (tim_one)
Assigned to: Nobody/Anonymous (nobody)
Summary: 64-bit zip problems
Initial Comment:
This is from c.l.py. There's not enough info (e.g.,
which OS, which compiler, which Python), but in case
anyone is wondering what to do with their IA64 box ...
From: John Wiegley
Sent: Thursday, August 16, 2001 6:14 PM
To: python-list@python.org
Subject: Problem with zipfile between 32-bit and 64-bit
Using the test script below, run it once on an Intel
32-bit platform. This produces test.zip, which
extracts hello.py.
Then take the test script and test.zip to an ia64
platform, and run it again. The file it extracts has
0 bytes.
I've run into other problems between ia32 and ia64,
such as bad checksums, and was wondering if anyone
knew anything about this?
Thanks,
John Wiegley <johnw@gnu.org>
----[ file: ziptest.py ]-------------------------------
---------------
import os
import zipfile
import string
if not os.path.exists('test.zip'):
zip = zipfile.ZipFile('test.zip', 'w')
zip.write('ziptest.py', 'hello.py')
zip.close()
zip = zipfile.ZipFile('test.zip', 'r')
if hasattr(zip, 'namelist'):
files = zip.namelist()
else:
files = zip.listdir()
for file in files:
file = apply(os.path.join, string.split
(file, '\'))
data = open(file, 'wb')
print "unarchiving", file
data.write(zip.read(file))
data.close()
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2001-09-04 12:51
Message:
Logged In: YES
user_id=11375
The zlib module seems to use struct.pack('l') for packing
some values, which should be 64-bits on a 64-bit platform.
Maybe that's the bug.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=453208&group_id=5470