0

im trying to give a progress bar to this code with zipfile module:

object = zipfile.ZipFile(name, 'w', zipfile.ZIP_LZMA)
object.write(f'{self.dir}\\{new_archive}')
os.remove(f"{self.dir}\\{new_archive}")

How can I do this? ps: this function runs in other threads

I tried with TQDM but without success.

edit: How can I measure zipfile module wait time while zipping?

jhown
  • 1
  • 1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – itprorh66 Dec 30 '22 at 16:29
  • Similar to [Extract ZipFile using Python, display Progress Percentage?](https://stackoverflow.com/questions/4341584/extract-zipfile-using-python-display-progress-percentage) – Aiq0 Jan 02 '23 at 17:27
  • no, I need to zip and not extract, the extraction already has a "predefined" size – jhown Jan 02 '23 at 18:54

0 Answers0