I need to run TCL script from python server which uses framework written in Python. TCL scripts uses a framework written in TCL. So is there a way where i can integrate TCL framework to python framework and execute my scripts.
asked Sep 29, 2014 at 5:06
Aniket
1352 gold badges3 silver badges10 bronze badges
-
1Have a look at docs.python.org/2/library/tkinter.html & stackoverflow.com/questions/1004434/…Dinesh– Dinesh2014年09月29日 05:22:41 +00:00Commented Sep 29, 2014 at 5:22
-
Can you be more specific? On the basis of what you've said so far, it could be anything from trivial to incredibly difficult...Donal Fellows– Donal Fellows2014年09月29日 13:27:07 +00:00Commented Sep 29, 2014 at 13:27
1 Answer 1
It seems that Tkinter is what you are looking for.
If you have a file of Tcl code in a file called foo.tcl and you want to call the Tcl function foo_bar then:
import Tkinter
root = Tkinter.Tk()
root.tk.eval('source {foo.tcl}')
root.tk.eval('foo_bar')
I'd take a look into it:
Sign up to request clarification or add additional context in comments.
Comments
lang-py