[Tutor] Python program design

Terry Carroll carroll at tjc.com
Sat Jul 21 21:57:26 CEST 2007


On Fri, 20 Jul 2007, Doug Glenn wrote:

> I have a question on program design.  The program will be a catalog of
> portable media (DVD, CD, flash drive, floppy, etc).  I am currently in the
> preliminary stages of design and I currently would like to get input on what
> the best method would be for initially gathering the data and what format it
> should take.

Doug, I'd be interested in talking more about this.  As it happens, I'm in 
the process of doing the same thing.  

Mine's going to be centered around SQLite, and when I get the DB part 
done, using wxPython for the GUI.

For myself, I'll use it for cataloging three kinds of data collections:  
audio (MP3, etc.); images (JPG, GIF, PNG, BMP, etc.); and videos (MPG,
AVI, etc).  I plan on having the DB be extensible with separate auxiliary
tables describing attributes specific to the type of file the database
pertains to. For example, for an MP3 database, it will store the length of
the song, and perhaps certain ID3 data.  For an image database, the image
height and width.

I'm just finishing up the design and am about to start writing some code.  
The design I have so far is the database schema and the API to the module.
I'd be happy to share some of my design ideas with you if you like.

Once I have even a version up and running, I'm thinking of putting it up 
somewhere under an open source license, in case someone else can use it, 
and to get the benefits of anyone else's contributions, if any.

I currently use Elcom's Advanced Disk Catalog for my cataloging.  I'm 
switching to a homegrown version for a few reasons.  First, ADC does not 
do anything media-specific, such as I described above.  Although 
there are some open-source databases that do, they're all specific 
to a particular type of file, i.e., either MP3 or image, but not 
either/both.  

Second, I plan on storing the files' checksums, to be able to check
whether a file I have is already duplicated in the library, without having
to mount the disks.  

Third, I think it would just be a fun project, and a way to start into
both SQLite and wxPython (it's my first project using either).

Caveat: I'm no longer a programmer, and have two baby girls who take most 
of my spare time, so I am proceeding very slowly on this.  It's just a 
hobby.



More information about the Tutor mailing list