2010 December

Turtle Graphics with Dexy

December 31, 2010   ·   By   ·   Comments Off   ·   Posted in Code

Here’s a fun Python demo for Dexy involving turtle graphics. Python has a built-in turtle graphics library, letting you play with the turtle commands you might remember from Logo (although wihout the lisp).

After LOTS of digging in my stubborn determination to figure out a way to render or save the graphics, I found that Tkinter canvases have the option to render their contents in postscript format, so after writing two new Dexy filters we can automate the entire process as follows:

  "turtle-*.py|py|ps2pdf|pdf2png" : {}

Read more…