| Reply | « Previous Thread | Next Thread » |
|
Hello,
is there a way to savely cancel an ongoing download? (e.g. because due to a poor network the download takes too long). I started a download with: Code:
res = urllib.urlretrieve(img_url,"e:\\test.png",hook) Thx novis |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
There doesn't seem to be any standard way to do that. Nothing related is said in the urllib documentation and a Google search only returned this discussion, which doesn't have a clear conclusion.
|
|
Hello bogdan.galiceanu,
thx for the fast reply. I also couldn't find a save solution in the python docs. The only but dirty solution that comes to my mind is this: I'll run the download in a thread. When I want to cancel the download, I just throw an exception in the "reporthook" function. Not nice but there seems to be no better way. cu novis |
|
Quote:
Cheers, --jouni |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
actually you can try a thing if you feel that the download is bad due to network connection. Then detect the strength of the network using the sysagent module and once it goes a predefined low limit then close your active connection by this. article. Just a hint. Enjoy Pythoning Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Hi JOM,
unfortunately using "access_point.stop()" does not abort ongoing downloads. thx gaba88, checking the signal strength proofed to be not very reliable (especially in 3G networks). Moreover the returned signal strength of nokia devices is not "real time measured". The returned signal strength seems to be averaged over a certain amount of time. And, you can still loose network during a download. For any case, it'd be more then useful to have the option to cancel an ongoing download. So far, I was searching the net to find a solution but without success. Maybe a download expert might give us a hint ![]() Thx novis |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
really sad that it didnt worked for you. And you are correct that the network signal returned is not the real time signal. And its more sad for you as i also searched bit and found nothing on how to cancel the download . ![]() ![]() Regards Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
"Dont let the system bring you down."
![]() I'm sure there is a solution out there. We just need to find it. cunovis |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
Enjoy Pythoning Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Check urlgrabber library.
Mikko Ohtamaa Twinapex Research http://www.twinapex.com |
|
Quote:
Check urlgrabber library. tnks |
| jalpesh_patel17 |
| View Public Profile |
| Find all posts by jalpesh_patel17 |
|
that library looks nice but just stupid basic question, how to import it?
I tried to use these steps: http://wiki.forum.nokia.com/index.ph...tall_libraries http://www.nbl.fi/~nbl928/README-0.27.txt etc (I tried first without signing and without capabilities because assuming that getting running is not needing those, only getting it working correctly. right? ![]() and even if easy to make sis file of the whole directory (only *.py files in \resource directory) and to install it but then when trying to call those in the phone (used urlgrabber.py as main) then seems that import not yet working. |
| timoriensis |
| View Public Profile |
| Find all posts by timoriensis |
|
Put the library files in C:\Resource or any folder and append that path.
Use this code: Quote:
Best Regards, Croozeus |
|
mmm,
nice library indeed. Thx 2 miohtama Many nice features. But no possibility to cancel an ongoing download in that library either. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Download Application and Technology | arizkohli | General Browsing | 0 | 2003-06-27 16:16 |
| Download Application and Technology | arizkohli | General Symbian C++ | 0 | 2003-06-27 16:14 |