is there anyway to run Tcl from Ruby??
···
--
Posted via http://www.ruby-forum.com/.
is there anyway to run Tcl from Ruby??
--
Posted via http://www.ruby-forum.com/.
Ukrit Himakoon wrote:
is there anyway to run Tcl from Ruby??
Depends on what you mean run Tcl from Ruby. If you mean run a Tcl application from a Ruby application sure. If you mean invoke Tcl procs or load Tcl packages and run procs from that pacakge from within ruby probably that requires wrapping what you want done in an application that can be run from Ruby.
Can you be a bit more detailed about what you want to do
Ron
--
Ron Fox
NSCL
Michigan State University
East Lansing, MI 48824-1321
Message-ID: <26291dc471038f215e0f7743721530f2@ruby-forum.com>
From: Ukrit Himakoon <tuky42@hotmail.com>
Subject: Tcl execution by ruby?
Date: Thu, 5 Feb 2009 17:21:11 +0900
is there anyway to run Tcl from Ruby??
----------------------------------------------------------------------------
require 'tk'
Tk.load_tclscript(tcl_script_file, encoding=nil) # => use 'source' command
Tk.load_tcllibrary(file, pkg_name=None, interp=None) #=> use 'load' command
Tk.ip_eval(tcl_script_string) # eval the string as a bit of a tcl script
Tk.tk_call(arg, ....) # each arg is a token of command line
TkComm.window(widget_path) # get a widget object if the widget exists
----------------------------------------------------------------------------
If you want to call a Tcl script without Tk,
----------------------------------------------------------------------------
require 'tcltklib'
interp = TclTkIp.new(ip_name, false)
interp._invoke('info', 'patchlevel')
interp._eval('puts foo; info patchlevel')
----------------------------------------------------------------------------
# see '<ruby-src-tree>/ext/tk/MANUAL_tcltklib.eng'
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Ron Fox wrote:
Ukrit Himakoon wrote:
is there anyway to run Tcl from Ruby??
Depends on what you mean run Tcl from Ruby. If you mean run a Tcl
application from a Ruby application sure. If you mean invoke Tcl
procs or load Tcl packages and run procs from that pacakge from within
ruby probably that requires wrapping what you want done in an
application that can be run from Ruby.Can you be a bit more detailed about what you want to do
Ron
Sure thing Ron I'm working on a project which migrate tcl framework onto
web browser , Rails is a tool i choose. So I believe that Ruby will be
able to run passthrough this :). so please give me some idea.
--
Posted via http://www.ruby-forum.com/\.
Hidetoshi NAGAI wrote:
From: Ukrit Himakoon <tuky42@hotmail.com>
Subject: Tcl execution by ruby?
Date: Thu, 5 Feb 2009 17:21:11 +0900
Message-ID: <26291dc471038f215e0f7743721530f2@ruby-forum.com>is there anyway to run Tcl from Ruby??
----------------------------------------------------------------------------
require 'tk'
Tk.load_tclscript(tcl_script_file, encoding=nil) # => use 'source'
command
Tk.load_tcllibrary(file, pkg_name=None, interp=None) #=> use 'load'
command
Tk.ip_eval(tcl_script_string) # eval the string as a bit of a tcl script
Tk.tk_call(arg, ....) # each arg is a token of command line
TkComm.window(widget_path) # get a widget object if the widget exists
----------------------------------------------------------------------------If you want to call a Tcl script without Tk,
Thx Hidetoshi I'm trying with your solution on rails but I've some
question
If I'm implementing rails which path I should place my tcl file?
--
Posted via http://www.ruby-forum.com/\.
Message-ID: <ff04985d72e17e87ae43a3b0138bb2c0@ruby-forum.com>
Sure thing Ron I'm working on a project which migrate tcl framework onto
web browser , Rails is a tool i choose. So I believe that Ruby will be
Ruby/TkORCA (http://www.dumbo.ai.kyutech.ac.jp/~nagai/RubyTk/?RubyTkORCA\)
may be able to make your Ruby/Tk (Tcl/Tk) application accessible
from web browsers.
From: Ukrit Himakoon <tuky42@hotmail.com>
Subject: Re: Tcl execution by ruby?
Date: Fri, 6 Feb 2009 16:17:35 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Message-ID: <5a0135677cf6a3871aea6e64429337cb@ruby-forum.com>
Thx Hidetoshi I'm trying with your solution on rails but I've some
question
If I'm implementing rails which path I should place my tcl file?
As you like. And use fullpath of the tcl file.
From: Ukrit Himakoon <tuky42@hotmail.com>
Subject: Re: Tcl execution by ruby?
Date: Fri, 6 Feb 2009 16:36:16 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Ukrit Himakoon wrote:
Ron Fox wrote:
Ukrit Himakoon wrote:
is there anyway to run Tcl from Ruby??
Depends on what you mean run Tcl from Ruby. If you mean run a Tcl
application from a Ruby application sure. If you mean invoke Tcl
procs or load Tcl packages and run procs from that pacakge from within
ruby probably that requires wrapping what you want done in an
application that can be run from Ruby.Can you be a bit more detailed about what you want to do
Ron
Sure thing Ron I'm working on a project which migrate tcl framework onto web browser , Rails is a tool i choose. So I believe that Ruby will be able to run passthrough this :). so please give me some idea.
Well I'm probably being a heretic here, but had you investigated the Tcl browsr plugin? Jeff Hobbs at ActiveState could probably provide you with a fair bit of info on how usable that might be for your application.. which in this case would be to put the tcl framework directly inside the browser.
Ron
--
Ron Fox
NSCL
Michigan State University
East Lansing, MI 48824-1321