Example #1
0
func DoEval(str string) error {
	log.Println(str)
	interp := GetInterp()
	err := tcl.Eval(interp, str)
	if err != nil {
		return err
	}
	return nil
}
Example #2
0
// 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
}
Example #3
0
func Cmd(interp *tcl.Interp, script string) error {
	return tcl.Eval(interp, script)
}