Unable to extract Python source code using Windows

Discussion in 'Python' started by Elric02@rogers.com, May 16, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. 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 ''.split('@')])"
    bruno at modulix, May 16, 2006
    #2
    1. Advertising

  3. 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 David Daniels, May 16, 2006
    #3
  4. Guest

    >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, 2006
    #4
  5. Guest

    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, 2006
    #5
  6. 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.3/Python-2.4.3.tar.bz2
    Philippe Martin, May 16, 2006
    #6
  7. 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
    Scott David Daniels, May 16, 2006
    #7
  8. 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
    Scott David Daniels, May 16, 2006
    #8
  9. John Machin Guest

    > http://www.python.org/ftp/python/2.4.3/Python-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, ....
    John Machin, May 16, 2006
    #9
  10. John Machin Guest

    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
    John Machin, May 17, 2006
    #10
  11. John Machin wrote:

    >> http://www.python.org/ftp/python/2.4.3/Python-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
    Philippe Martin, May 17, 2006
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xing Xu

    About extract call graph from C source code

    Xing Xu, Jan 14, 2004, in forum: C Programming
    Replies:
    6
    Views:
    6,639
    James Antill
    Jan 17, 2004
  2. Replies:
    4
    Views:
    450
    Dennis Lee Bieber
    May 17, 2006
  3. Pavel Shved
    Replies:
    11
    Views:
    537
    Pavel Shved
    Nov 12, 2007
  4. kittywindz2

    Extract a specific function in C source code

    kittywindz2, Dec 4, 2010, in forum: C Programming
    Replies:
    0
    Views:
    381
    kittywindz2
    Dec 4, 2010
  5. Mahesh
    Replies:
    0
    Views:
    87
    Mahesh
    Oct 4, 2003
Loading...

Share This Page