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).
I got it to an acceptable solution – Though I think I would prefer it thread it eventually.