Gosh Mark you must be a friggin genius or something. I can't even begin to read your code. Anyways, I think mine is easier to understand. My program has all the functions (save a couple) that you would need for your project. It's an exercise for you to copy and paste what you want where you want it and to form a basic program structure out of it. some of my comments spilled on to the next line (thanks google!) so you will have to clean it up a bit.
-- http://mail.python.org/mailman/listinfo/python-list