From: Andy T. <an...@us...> - 2005-12-13 11:13:51
|
Update of /cvsroot/pythoncard/PythonCard/samples/lsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19204/lsystem Modified Files: lsystem.py lsystemInteractive.py Log Message: Removed all of the plain except: clauses I could Index: lsystem.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/lsystem/lsystem.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lsystem.py 12 Aug 2004 19:18:54 -0000 1.5 --- lsystem.py 13 Dec 2005 11:13:23 -0000 1.6 *************** *** 2,8 **** """ __version__ = "$Revision$" __date__ = "$Date$" - """ from PythonCard import clipboard, dialog, graphic, model --- 2,9 ---- """ + A fractal display program using the Lindenmayer rule system to describe the fractal. + """ __version__ = "$Revision$" __date__ = "$Date$" from PythonCard import clipboard, dialog, graphic, model *************** *** 144,152 **** fileType = graphic.bitmapType(path) print fileType, path try: - bmp = self.components.bufOff.getBitmap() bmp.SaveFile(path, fileType) return True ! except: return False else: --- 145,153 ---- fileType = graphic.bitmapType(path) print fileType, path + bmp = self.components.bufOff.getBitmap() try: bmp.SaveFile(path, fileType) return True ! except IOError: return False else: *************** *** 204,222 **** class LSystemTests(pyunit.TestCase): ! def setUp(self): ! pass ! ! def tearDown(self): ! pass ! ! def testBoundsCheckBackwardMoves(self): ! bounds = drawAbstractFractal('BB+B', 1, 90, (10.0,20.0)) ! # remember that down is positive in this coordinate system ! self.assertEqual([9.0, 20.0, 10.0, 22.0], bounds) ! ! def testBoundsCheckForwardMoves(self): ! bounds = drawAbstractFractal('FF-F', 1, 90, (10.0,20.0)) ! # remember that down is positive in this coordinate system ! self.assertEqual([9.0, 18.0, 10.0, 20.0], bounds) if __name__ == '__main__': --- 205,220 ---- class LSystemTests(pyunit.TestCase): ! def setUp(self): ! pass ! def tearDown(self): ! pass ! def testBoundsCheckBackwardMoves(self): ! bounds = drawAbstractFractal('BB+B', 1, 90, (10.0,20.0)) ! # remember that down is positive in this coordinate system ! self.assertEqual([9.0, 20.0, 10.0, 22.0], bounds) ! def testBoundsCheckForwardMoves(self): ! bounds = drawAbstractFractal('FF-F', 1, 90, (10.0,20.0)) ! # remember that down is positive in this coordinate system ! self.assertEqual([9.0, 18.0, 10.0, 20.0], bounds) if __name__ == '__main__': Index: lsystemInteractive.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/lsystem/lsystemInteractive.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lsystemInteractive.py 22 May 2004 01:05:29 -0000 1.2 --- lsystemInteractive.py 13 Dec 2005 11:13:23 -0000 1.3 *************** *** 2,8 **** """ __version__ = "$Revision$" __date__ = "$Date$" - """ from PythonCard import clipboard, dialog, graphic, model --- 2,9 ---- """ + A fractal display program using the Lindenmayer rule system to describe the fractal. + """ __version__ = "$Revision$" __date__ = "$Date$" from PythonCard import clipboard, dialog, graphic, model *************** *** 47,51 **** int(self.components.angleDisplay.text) self.on_Render_command(None) ! except: pass --- 48,52 ---- int(self.components.angleDisplay.text) self.on_Render_command(None) ! except ValueError: pass |