Unable to extract Python source code using Windows
Scott David Daniels
scott.daniels at acm.org
Tue May 16 13:04:27 EDT 2006
Elric02 at rogers.com wrote:
> I'm currently trying to get access to the Python source code, however
> whenever I try to extract the files using the latest version of WinZip
> (version 10) I get the following error "error reading header after
> processing 0 entries"
> I was under the impression that I could (from reading the various posts
> on this group) that I could simply extract the tar ball, using WinZip.
Perhaps you pulled the file as a non-binary (and so got LFs turned to
CRLFs). You should be able to use a recent Python to read the archive
as well. First, I'd do:
import md5
BLOCK_SIZE = 4096 * 8 # or whatever
accumulator = md5.new()
source = open('whatever.tar.gz', 'rb')
try:
while True:
data = source.read(BLOCK_SIZE)
if data:
accumulator.update(data)
else:
break
finally:
source.close()
print 'md5 checksum =', accumulator.hexdigest()
Compare that result to the published checksum for the archive
to make sure you don't have a garbled archive.
--Scott David Daniels
scott.daniels at acm.org
More information about the Python-list
mailing list