running TCL from python
Avik Ghose
avikghose at yahoo.co.in
Fri Mar 19 09:14:39 EST 2004
Thanks a lot!
Cameron Laird <claird at lairds.com> wrote:In article ,
Avik Ghose wrote:
.
.
.
>How can I run a TCL script from within my python code?
.
.
.
There are several ways. Perhaps it's time to enumerate them in a
Wikified essay ... In any case, I'll wildly speculate that this
is the one that best models your situation:
import Tkinter
tcl_script = 'puts "The sum of 2 and 3 is [expr 2 + 3]."'
Tkinter.Tk().tk.eval(tcl_script)
--
Cameron Laird
Business: http://www.Phaseit.net
--
http://mail.python.org/mailman/listinfo/python-list
Thanks and regards,
Avik Ghose
Yahoo! India Promos: Win a trip for 2 to Britain. Click here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040319/f7a74536/attachment.html>
More information about the Python-list
mailing list