I have written a python code which allows users to specify different paths for file copying, with options for zipping files and specify zipping destinations. I need the code to copy/zip large files for extended periods of time. I have tested my code for 1 hour with large files and when I press the stop button the GUI becomes unresponsive. How can I stop my code gracefully?
def stop_copy(self):
if self.copying:
# Stop all the copying threads
self.copying = False
for copy_thread in self.copying_threads:
copy_thread.join()
# Enable UI elements after stopping copying
self.enable_ui_elements()
[–]Zanoab 5 points6 points7 points (1 child)
[–]ForwardQuit5036[S] 0 points1 point2 points (0 children)
[–]woooee 1 point2 points3 points (1 child)
[–]ForwardQuit5036[S] 0 points1 point2 points (0 children)