Converted enable.tcl example to python