Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> >>> drawLS('F-F++F-F SyntaxError: EOL while scanning string literal (, line 1) >>> t = Turtle() >>> drawLS(t, 'F-F++F-F', 60, 20) >>> kochRules = {'F':'F-F++F-F'} >>> applyProduction('F', kochRules, 0) 'F' >>> applyProduction('F', kochRules, 1) 'F-F++F-F' >>> applyProduction('F', kochRules, 2) 'F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F' >>> applyProduction('F', kochRules, 3) 'F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F-F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F-F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F' >>> kochRules.get('F', 'nothing') 'F-F++F-F' >>> kochRules.get('+', 'nothing') 'nothing' >>> kochRules.get('+', '+') '+' >>> t.exitOnClick() >>> lsystem('F', kochRules, 4, (0,0), 0, 60, 5) >>> lsystem('F', kochRules, 4, (-300,0), 0, 30, 5) >>> lsystem('F++F++F', kochRules, 4, (-300,200), 0, 60, 0) Traceback (most recent call last): File "", line 1, in lsystem('F++F++F', kochRules, 4, (-300,200), 0, 60, 0) File "/Users/gustavus/Desktop/lsystem.py", line 52, in lsystem drawLS(aTurtle,instructions,angle,length) File "/Users/gustavus/Desktop/lsystem.py", line 28, in drawLS aTurtle.left(angle) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/cTurtle.py", line 1223, in left checkargs((int, float)) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/cTurtle.py", line 2302, in _rotate self._orient = neworient File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/cTurtle.py", line 2085, in _update for t in screen._turtles: File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/cTurtle.py", line 2224, in _drawturtle np = (self._position[0]*xscale, self._position[1]*yscale) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/cTurtle.py", line 526, in _drawimage (x, y) = xxx_todo_changeme File "", line 1, in coords File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__init__.py", line 2120, in coords self.tk.call((self._w, 'coords') + args))) _tkinter.TclError: invalid command name ".17607184" >>> lsystem('F++F++F', kochRules, 0, (-300,200), 0, 60, 5) >>> lsystem('F++F++F', kochRules, 3, (-300,200), 0, 60, 5) >>> aRules = {'F':'F-F++F-F+F--F'} >>> aRules = {'F':'F-F++F-F+F--F+F'} >>> lsystem('F', aRules, 1, (-300,0), 0, 30, 5) >>> lsystem('F', aRules, 1, (-300,0), 0, 60, 50) >>> lsystem('F', aRules, 3, (-300,0), 0, 60, 6) >>> cRules={'F':'-F++F-'} >>> lsystem('F', aRules, 3, (0,-200), 90, 45, 6) >>> lsystem('F', cRules, 3, (0,-200), 90, 45, 6) >>> lsystem('F', cRules, 8, (0,-200), 90, 45, 6) >>> dRules={'F':'', 'L':'-FL++FR-', 'R':'+FL--FR+'} >>> lsystem('F', dRules, 8, (0,-200), 90, 45, 6) >>> lsystem('FR', dRules, 8, (0,-200), 90, 45, 6) >>> lsystem('FL', dRules, 8, (0,-200), 90, 45, 6) >>>