Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4266238
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:44:00+00:00 2026-05-21T06:44:00+00:00

I have several large zip file that contain a dir structure that I must

  • 0

I have several large zip file that contain a dir structure that I must maintain. Currently to unzip them I am using

    zip = zipfile.ZipFile(self.fileName)        
    zip.extractall(self.destination)
    zip.close()

The problem is that these process can take upwards of 3-5 minutes and I have no feedback that they are still working. What I would like to do is output the name of the file currently being unziped to the status bar of my gui. What I have in mind is something like

    zip = zipfile.ZipFile(self.fileName)
    zipNameList = zipfile.namelist(self.fileName)
    for item in zipNameList:
        self.SetStatusText("Unzipping" + str(item))
        zip.extract(item)
    zip.close()

The problem with this is that it does not create the correct dir structure. I am not sure that this is even the best way to go about it.

I was also looking into using wx.progressdialog but could not come up with a way to have it show progress of the zip.extractall(filename).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:44:01+00:00Added an answer on May 21, 2026 at 6:44 am

    I got it to an acceptable solution – Though I think I would prefer it thread it eventually.

    def unzipItem(self, fileName, destination)
        print "--unzipItem--"
        zip = zipfile.ZipFile(fileName)
        nameList = zip.namelist()
    
        #get the amount of files in the file to properly size the progress bar
        fileCount = 0
        for item in nameList:
            fileCount += 1
    
        #Built progress dialog
        dlg = wx.ProgressDialog("Unziping files",
                               "An informative message",
                               fileCount,
                               parent = self,
                               )
    
        keepGoing = True
        count = 0
    
        for item in nameList:
            count += 1
            dir,file = os.path.split(item)
            print "unzip " + file
    
            #update status bar
            self.SetStatusText("Unziping " + str(item))
            #update progress dialog
            (keepGoing, skip) = dlg.Update(count, file)
            zip.extract(item,destination)
    
        zip.close()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several large csv files with thousands of columns that I need to
I have several large projects that I work on. Depending on the project and
I have several large MyISAM tables (data file around 1.5 GB) which I need
I have several large word lists and I had been loading them in place
I have several csv's that look like this: I have several large text files
I have several very large zip files available to download on a website. I
I have several large (200+ lines) of HTML that I need to place in
I have several large websites that I wish to create a WIX installer for.
I have a large program with several large DLL's that are compiled with MFC
I'm using paperclip, and have several styles: :styles => {:large => 300x300>, :medium =>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.