Unable to extract Python source code using Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Elric02@rogers.com

    #1

    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

  • bruno at modulix

    #2
    Re: Unable to extract Python source code using Windows

    Elric02@rogers. com wrote:[color=blue]
    > I'm currently trying to get access to the Python source code, however
    > whenever I try to extract the files[/color]

    from what ?
    [color=blue]
    > 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.[/color]

    I don't know if winzip handles tarballs...
    [color=blue]
    > If this is not the case does anybody know how I can actually get source
    > code on Windows platform.[/color]

    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 'onurb@xiludom. gro'.split('@')])"

    Comment

    • Scott David Daniels

      #3
      Re: Unable to extract Python source code using Windows

      Elric02@rogers. com wrote:[color=blue]
      > 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.[/color]


      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(BLO CK_SIZE)
      if data:
      accumulator.upd ate(data)
      else:
      break
      finally:
      source.close()
      print 'md5 checksum =', accumulator.hex digest()

      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@a cm.org

      Comment

      • Elric02@rogers.com

        #4
        Re: Unable to extract Python source code using Windows

        >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.

        Comment

        • Elric02@rogers.com

          #5
          Re: Unable to extract Python source code using Windows

          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.

          Comment

          • Philippe Martin

            #6
            Re: Unable to extract Python source code using Windows

            Elric02@rogers. com wrote:
            [color=blue][color=green]
            >>You can get Python sources from python.org[/color]
            >
            > 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.[/color]






            Comment

            • Scott David Daniels

              #7
              Re: Unable to extract Python source code using Windows

              Elric02@rogers. com wrote:[color=blue]
              > 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.[/color]

              And what checksum did you get?


              --Scott David Daniels
              scott.daniels@a cm.org

              Comment

              • Scott David Daniels

                #8
                Re: Unable to extract Python source code using Windows

                Elric02@rogers. com wrote:[color=blue]
                > 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.
                >[/color]
                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:
                141c683447d5e76 be1d2bd4829574f 02

                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.daniels@a cm.org

                Comment

                • John Machin

                  #9
                  Re: Unable to extract Python source code using Windows

                  > 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, ....

                  Comment

                  • John Machin

                    #10
                    Re: Unable to extract Python source code using Windows

                    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

                    Comment

                    • Philippe Martin

                      #11
                      Re: Unable to extract Python source code using Windows

                      John Machin wrote:
                      [color=blue][color=green]
                      >> http://www.python.org/ftp/python/2.4...-2.4.3.tar.bz2[/color]
                      >
                      > 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, ....[/color]


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



                      Comment

                      Working...