Python and Tcl solutions.