threads, file access and stuff

S

Slackydude

Hi,
i'm trying to make a download manager (getright, flashget, etc..) for
linux (pygtk), i'm using pyCurl, so the thing is..
the app need to be able to use mirrors, like : i download the first 400
kb from X, and the second 200 kb from Y and the rest from Z.
i've plan to do this with threads and using Locks (This question has
been here before, so i have an idea..)
but the thing is, What if the app don't download a complete file in a
session (the user close the app, etc) and wants to complete the
download? Ok, i can seek the file and start to download again. but
where or how can i store that info?(where i left the download).

any ideas appreciated.
 
B

Bruno Desthuilliers

Hi,
i'm trying to make a download manager (getright, flashget, etc..) for
linux (pygtk), i'm using pyCurl, so the thing is..
the app need to be able to use mirrors, like : i download the first 400
kb from X, and the second 200 kb from Y and the rest from Z.
i've plan to do this with threads and using Locks (This question has
been here before, so i have an idea..)
but the thing is, What if the app don't download a complete file in a
session (the user close the app, etc) and wants to complete the
download? Ok, i can seek the file and start to download again. but
where or how can i store that info?(where i left the download).

Where : the convention on *n*x is to store this kind of stuff in a
..<appname> file or directory in the users's home.

How : this is up to you, but I'd start with the simplest solution, ie an
ini file (ConfigParser is your friend here).

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,609
Members
45,253
Latest member
BlytheFant

Latest Threads

Top