downloading the file and cancel in python
问题 I'm working on my python script to download a xml file from my server and write the data in a sqlite3 database in parallel. I need some help regarding how to cancel the connection from my server using the urllib2 library. I want the database to stop writing the data away as soon as the connection ahs been cancelled. The allchannels_timer will be called when the user hits the 'enter' button, which will wait one second before connecting to my server to download the xml file. I want to download