From: Andy T. <an...@us...> - 2005-12-13 11:14:09
|
Update of /cvsroot/pythoncard/PythonCard/samples/financial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19204/financial Modified Files: mortgage.py Log Message: Removed all of the plain except: clauses I could Index: mortgage.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/financial/mortgage.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mortgage.py 20 Jul 2004 18:22:35 -0000 1.1 --- mortgage.py 13 Dec 2005 11:13:22 -0000 1.2 *************** *** 2,13 **** """ __version__ = "$Revision$" __date__ = "$Date$" - """ from PythonCard import dialog, model import pyfi ! class MyBackground(model.Background): def on_initialize(self, event): --- 2,16 ---- """ + A mortgage repayment calculator. Used in the presentation at VanPy 2005 and PyCon 2005. + + Subsequently borrowed for the presentation at OSDC 2005 + """ __version__ = "$Revision$" __date__ = "$Date$" from PythonCard import dialog, model import pyfi ! class MyBackground(model.Background) def on_initialize(self, event): *************** *** 26,33 **** payment30 = pyfi.amortization(principal, interestRate, 12, 30 * 12) comp.Result.text = "15 year monthly payment: %.2f\n30 year monthly payment: %.2f" % (payment15, payment30) ! except: dialog.alertDialog(self, 'Please enter valid values', 'Input Value(s) Error') - if __name__ == '__main__': app = model.Application(MyBackground) --- 29,35 ---- payment30 = pyfi.amortization(principal, interestRate, 12, 30 * 12) comp.Result.text = "15 year monthly payment: %.2f\n30 year monthly payment: %.2f" % (payment15, payment30) ! except ValueError: dialog.alertDialog(self, 'Please enter valid values', 'Input Value(s) Error') if __name__ == '__main__': app = model.Application(MyBackground) |