Yukihiro Matsumoto
1/12/2005 11:26:00 PM
Hi,
In message "Re: Run TCL in ruby"
on Thu, 13 Jan 2005 02:11:55 +0900, tony summerfelt <snowzone5@hotmail.com> writes:
|>Is there a simple way to run TCL code from ruby?
|
|from the examples posted here it's relatively simple, but
|communicating with between ruby and tcl seems to be a
|nightmare :/
The tcltklib extension, which comes with the standard distribution,
invokes Tcl interpreter directly without any inter-process
communication.
matz.
require "tcltklib"
def test
ip1 = TclTkIp.new()
puts ip1._eval("button .lab -text exit -command \"destroy .\"").inspect
puts ip1._eval("pack .lab").inspect
puts ip1._eval(%q+puts [ruby {print "print by ruby\n"; "puts by tcl/tk"}]+).inspect
TclTkLib.mainloop
end
test