Is it possible to embed tclsh in Tk? I'm trying to send commands from a user interface made by tk and observe its results.
If so, could you help to pose some simple codes for this? Thank you very much.
Is it possible to embed tclsh in Tk? I'm trying to send commands from a user interface made by tk and observe its results.
If so, could you help to pose some simple codes for this? Thank you very much.
You should take a look at the interp command to create and manipulate tcl interpreters:
http://wiki.tcl.tk/1477
You should be able to first create a interpreter this way and evaluate strings from your Tk Application.
A minimal example to create an interpreter and evaluate a a string in it: