Re: unzipping a zipx file

Discussion in 'Python' started by Tim Chase, Apr 19, 2013.

  1. Tim Chase

    Tim Chase Guest

    On 2013-04-19 16:29, Dave Angel wrote:
    > > zFile = zipfile.ZipFile(fullPathName,'r')

    >
    > The second parameter to ZipFile() probably should be 'rb' not 'r'


    Just for the record, the zipfile.ZipFile.__init__ maps "r" to open the
    file with "rb", so that's not the issue.

    Your suggestion about opening the file to write in binary mode is a
    good one, but I'd just suggest using ZipFile.extract(...) which is
    built in and takes care of writing the file for you. :)

    -tkc
    Tim Chase, Apr 19, 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:
    292
    Doug Tolton
    Dec 9, 2003
  2. webcomm
    Replies:
    10
    Views:
    726
    John Machin
    Jan 10, 2009
  3. b_erickson1

    unzipping a zipx file

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

    Re: unzipping a zipx file

    Dave Angel, Apr 19, 2013, in forum: Python
    Replies:
    0
    Views:
    135
    Dave Angel
    Apr 19, 2013
  5. Serhiy Storchaka

    Re: unzipping a zipx file

    Serhiy Storchaka, Apr 20, 2013, in forum: Python
    Replies:
    0
    Views:
    130
    Serhiy Storchaka
    Apr 20, 2013
Loading...

Share This Page