threads, file access and stuff

Bruno Desthuilliers onurb at xiludom.gro
Fri Aug 4 06:41:52 EDT 2006


Slackydude at gmail.com wrote:
> 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
-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list