Reputation: 106
urlretrieve(URL, file_path, self.reporthook)
I use tkinter for Python 3 and want to abort downloading a file and close the application when user press close button.
Upvotes: 0
Views: 193
Reputation: 461
You should look into multiprocessing. May not be what it was intended to do, but it should be possible to kill off outside of the code thread.
https://docs.python.org/3/library/multiprocessing.html
Upvotes: 1