func DoEval(str string) error { log.Println(str) interp := GetInterp() err := tcl.Eval(interp, str) if err != nil { return err } return nil }
// Get the Tcl/Tk interpreter func getInterp() (interp *tcl.Interp, err error) { interp = tcl.CreateInterp() err = tcl.Init(interp) if err != nil { return } err = tk.Init(interp) if err != nil { return } err = tcl.Eval(interp, "namespace eval gt {}") return }
func Cmd(interp *tcl.Interp, script string) error { return tcl.Eval(interp, script) }