Forum: Ruby Tcl execution by ruby?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2da46bf3608ac6f8b50db545e267ce5c?d=identicon&s=25 Ukrit Himakoon (ukarick)
on 2009-02-05 09:21
is there anyway to run Tcl from Ruby??
F6a834b9e424a1e5b199db450462b6cd?d=identicon&s=25 Ron Fox (Guest)
on 2009-02-05 11:15
(Received via mailing list)
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
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 Hidetoshi NAGAI (Guest)
on 2009-02-05 21:08
(Received via mailing list)
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,
2da46bf3608ac6f8b50db545e267ce5c?d=identicon&s=25 Ukrit Himakoon (ukarick)
on 2009-02-06 08:18
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.
2da46bf3608ac6f8b50db545e267ce5c?d=identicon&s=25 Ukrit Himakoon (ukarick)
on 2009-02-06 08:33
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?
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 Hidetoshi NAGAI (Guest)
on 2009-02-09 07:40
(Received via mailing list)
From: Ukrit Himakoon <tuky42@hotmail.com>
Subject: Re: Tcl execution by ruby?
Date: Fri, 6 Feb 2009 16:17:35 +0900
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. ;-)
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 Hidetoshi NAGAI (Guest)
on 2009-02-09 07:41
(Received via mailing list)
From: Ukrit Himakoon <tuky42@hotmail.com>
Subject: Re: Tcl execution by ruby?
Date: Fri, 6 Feb 2009 16:36:16 +0900
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.
F6a834b9e424a1e5b199db450462b6cd?d=identicon&s=25 Ron Fox (Guest)
on 2009-02-09 13:20
(Received via mailing list)
Ukrit Himakoon wrote:
>>
>> 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
This topic is locked and can not be replied to.