473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Urlopen.urlretrieve(url, to) can it be canceled/stopped/killed

does anybody know if there is a way to stop urlretrieve mid transfer or
are you simply bound to finishing the file you are on? If anybody
knows the answer to this let me know. i have read all the docs and
there is a callback or reporthook function, but I am not sure if that
can be used to halt the progress and close the socket.

-Justin

This is the final feature on my first program
Thanks to all the help from all on comp.lang.python

Jul 18 '05 #1
0 1643

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Egor Bolonev | last post by:
how they define proxy in urlopen? i've tried a=urlopen('url', proxies=('127.0.0.1:3128')) a=urlopen('url', proxies='127.0.0.1:3128') but it says there is an error ...
2
by: Sam Sungshik Kong | last post by:
Hello! I'm trying to download PDF files from web to my computer using urllib. Some pdf files are fine but other files are downloaded only 6kB which is wrong. It didn't show any error message. ...
2
by: John F Dutcher | last post by:
Can anyone comment on why the code shown in the Python error is in some way incorrect...or is there a problem with Python on my hoster's site ?? The highlites don't seem to show here...but line...
2
by: john | last post by:
Im new to python. So I was hoping someone could provide the following. How would I go about checking if a user can be opened. For example if user provides www.x.com, how would I check if there is...
3
by: Harlin Seritt | last post by:
I am trying to do the following: <of course website.com is not the actual site> import urllib url = 'http://www.website.com/file.shtml' dat = urllib.urlopen(url, 'r').read() print dat
1
by: Rene Lopez | last post by:
I'm building an app that needs to download a file from the web. I'm trying to make sure I catch any issues with the download but I've run into a problem. here's what I have so far: try:...
3
by: Tempo | last post by:
Hello. I am getting an error and it has gotten me stuck. I think the best thing I can do is post my code and the error message and thank everybody in advanced for any help that you give this issue....
11
by: Phoe6 | last post by:
Hi, The following piece of code works properly when my proxy password contains characters etc. But when my proxy password contained something like '|\/|' , the httplib incorrectly indentified it...
5
by: cjl | last post by:
Hi. I am trying to screen scrape some stock data from yahoo, so I am trying to use urllib2 to retrieve the html and beautiful soup for the parsing. Maybe (most likely) I am doing something...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.