467,893 Members | 1,898 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,893 developers. It's quick & easy.

Unable to extract Python source code using Windows

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.
If this is not the case does anybody know how I can actually get source
code on Windows platform. I don't have access to a UNIX box so that's
not an option for me
thanks in advance for any help you can provide
Jeff

May 16 '06 #1
  • viewed: 2752
Share:
10 Replies
El*****@rogers.com wrote:
I'm currently trying to get access to the Python source code, however
whenever I try to extract the files
from what ?
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.
I don't know if winzip handles tarballs...
If this is not the case does anybody know how I can actually get source
code on Windows platform.


You can get Python sources from python.org

HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
May 16 '06 #2
El*****@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
sc***********@acm.org
May 16 '06 #3
>You can get Python sources from python.org

I'm unable to locate a source file brings that will work with WinZip.
Can anybody please point me to the exact URL that will get me to the
source code? but it it is tar ball format or a gzip format, than that
will work for me as WinZip is not open.

May 16 '06 #4
Scott ,
I tried downloading for different archives, (different versions of
Python) I can't believe they are all garbled. But they all don't work
with WinZip.

May 16 '06 #5
El*****@rogers.com wrote:
You can get Python sources from python.org


I'm unable to locate a source file brings that will work with WinZip.
Can anybody please point me to the exact URL that will get me to the
source code? but it it is tar ball format or a gzip format, than that
will work for me as WinZip is not open.

http://www.python.org/ftp/python/2.4...-2.4.3.tar.bz2

May 16 '06 #6
El*****@rogers.com wrote:
Scott ,
I tried downloading for different archives, (different versions of
Python) I can't believe they are all garbled. But they all don't work
with WinZip.


And what checksum did you get?
--Scott David Daniels
sc***********@acm.org
May 16 '06 #7
El*****@rogers.com wrote:
Scott ,
I tried downloading for different archives, (different versions of
Python) I can't believe they are all garbled. But they all don't work
with WinZip.

OK, against my better judgment (you haven't shown your work so far):

I get an md5 for python-2.4.3.tar.bz2 of:
141c683447d5e76be1d2bd4829574f02

Next read about the tarfile module, where you may discover:

import tarfile
archive = tarfile.TarFile.open('python-2.4.3.tar.bz2', 'r:bz2')

might give you something interesting.
--
-Scott David Daniels
sc***********@acm.org
May 16 '06 #8
> http://www.python.org/ftp/python/2.4...-2.4.3.tar.bz2

And the reason for posting that would be what? WinZip doesn't support
bzip2 compression.

http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz (a gzipped tar
file) is what the OP would be better pointed at.

FWIW, I have just downloaded the above tgz file and successfully
unpacked it with WinZip versions 9 and 10, and with 7-Zip.

FWIW2, 7-Zip is *free* and handles bz2 files.

I would suggest that the OP's copy of WinZip v10 is stuffed, or his
whole download mechanism is stuffed. If he were to investigate properly
(as suggested by ScottDD) instead of thrashing about, ....

May 16 '06 #9
Elric02 wrote:
"""
I tried downloading for different archives, (different versions of
Python) I can't believe they are all garbled. But they all don't work
with WinZip.
"""

I can't believe that they're all garbled either. The likelihood of that
is small. Further, the probablility that all-pervasive garbling of tgz
files would go unnoticed is about three-tenths of five-eighths of an
extremely small number.

Reminds me of the story of the proud mother watching her son's regiment
on parade: "Look, everybody, my Tommy's the only one marching in
step!".

Let's rewrite your last sentence as "My copy of WinZip v10 doesn't work
with any of them", and go with the most plausible explanation.

HTH,
John

May 16 '06 #10
John Machin wrote:
http://www.python.org/ftp/python/2.4...-2.4.3.tar.bz2


And the reason for posting that would be what? WinZip doesn't support
bzip2 compression.

http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz (a gzipped tar
file) is what the OP would be better pointed at.

FWIW, I have just downloaded the above tgz file and successfully
unpacked it with WinZip versions 9 and 10, and with 7-Zip.

FWIW2, 7-Zip is *free* and handles bz2 files.

I would suggest that the OP's copy of WinZip v10 is stuffed, or his
whole download mechanism is stuffed. If he were to investigate properly
(as suggested by ScottDD) instead of thrashing about, ....

I never declared myself a winzip expert since I do not use it

May 17 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Zhang Le | last post: by
3 posts views Thread by James Proctor | last post: by
1 post views Thread by James Proctor | last post: by
32 posts views Thread by siggi | last post: by
2 posts views Thread by Kevin Ar18 | last post: by
1 post views Thread by Edwin.Madari | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.