From: Yukihiro Matsumoto Date: 2005-01-13T08:25:39+09:00 Subject: Re: Run TCL in ruby Hi, In message "Re: Run TCL in ruby" on Thu, 13 Jan 2005 02:11:55 +0900, tony summerfelt 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