On 24/01/13 05:32, SCS Barry wrote:
Need to fill some DVDs.
Sounds like an interesting project.
Most of what you need is in the os module.
create a python application that works on many different platforms, but
can work without problems on Windows (ALL), Linux (ALL) using
Gtk/xfce/other (need suggestions), and Unix (really need suggestions).
Tkinter or even EasyGUI should work fine for this and is portable.
Full solution for me will accept start directory and -c or -d parm
How do you specify the size? CD Roms come in 650M, 800M and 900M
variants (probably more!) Same with DVDs, single sided v double etc...
is not passed, there will be a "browse" interface to choose the
directory to start from (will determine OS from os call) and a media
drop-down selection. Will require a standard GUI environment like
windows/gtk/"something".
Any GUI framework will do that.
The main process will create a list of fully-qualified file names, file
sizes.
listdir or os.walk will do that combined with the file property
functions to get size.
Then, it will build a grouped list of files, filling media as
effectively as possible.
Thats just standard programming. Wikipedia might have saome best-fit
algorithms that can help.
Last, it will print on screen the lists of FQFNs and filesizes that will
go on each backup disk.
Again straight programming.
The trickiest bit might be the actual writing to the media. I'm not sure
how you do that portably... More research there I suspect. Maybe the OS
will do it transparently if you are lucky.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor