Re: unzipping a zipx file

Discussion in 'Python' started by Serhiy Storchaka, Apr 20, 2013.

  1. 19.04.13 20:59, b_erickson1 напиÑав(ла):
    > I have python 2.6.2 and I trying to get it to unzip a file made with winzip pro. The file extension is zipx. This is on a windows machine where I have to send them all that files necessary to run. I am packaging this with py2exe. I can open the file with
    > zFile = zipfile.ZipFile(fullPathName,'r')
    > and I can look through all the file in the archive
    > for filename in zFile.namelist():
    > but when I write the file out with this code:
    > ozFile = open(filename,'w')
    > ozFile.write(zFile.read(filename))
    > ozFile.close()
    > that file still looks encrypted.


    AFAIK some archivers use zipx extension for zip files which contains
    files compressed with advanced compression methods (bzip2, lzma, etc).
    Python supports bzip2 and lzma compression in zip files since 3.3.

    > No errors are thrown.


    Python 2.7 and 3.2 should raise an exception (this bug was fixed several
    months ago). 2.6 is too old and this fix was not backported to it.

    > What am I missing?


    Use Python 3.3 or at least 2.7.
    Serhiy Storchaka, Apr 20, 2013
    #1
    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. Doug Tolton

    File unzipping

    Doug Tolton, Dec 9, 2003, in forum: Python
    Replies:
    0
    Views:
    281
    Doug Tolton
    Dec 9, 2003
  2. webcomm
    Replies:
    10
    Views:
    710
    John Machin
    Jan 10, 2009
  3. b_erickson1

    unzipping a zipx file

    b_erickson1, Apr 19, 2013, in forum: Python
    Replies:
    4
    Views:
    145
    Dave Angel
    Apr 20, 2013
  4. Dave Angel

    Re: unzipping a zipx file

    Dave Angel, Apr 19, 2013, in forum: Python
    Replies:
    0
    Views:
    126
    Dave Angel
    Apr 19, 2013
  5. Tim Chase

    Re: unzipping a zipx file

    Tim Chase, Apr 19, 2013, in forum: Python
    Replies:
    0
    Views:
    103
    Tim Chase
    Apr 19, 2013
Loading...

Share This Page