Re: how do you get a handle to the interpreter?

From: Bruce Hartweg (bruce-news_at_hartweg.us)
Date: 06/08/04


Date: Tue, 08 Jun 2004 01:57:31 GMT

lmt wrote:

> Thanks for the reply
>
> Actually, I was trying to just link the C routine with libtcl and then
> launch it from the tcl script via exec, rather than creating it as a tcl
> command.
>
> I did it that way because:
> * I'm new to tcl and on a short deadline
> * the stuff I started to read on creating commands made the process look
> fairly involved
> * I only launch the C routine once so I wasn't sure it really needed to be
> made into a command
>
> I could make it into a command if necessary though. Any suggestions?
>
> Lynn
>

Umm, if you are launching it via exec it is a complely different process,
you need to create a standalone program, and then it will have absolutely
*nothing* to do with the insterpreter of you particular script, you would
have to have the program puts it's results on stdout and then you would
get them from theresult of the exec call.

It isn't that hard to register it as a command so it can be called
directly from your script, at which point the command itself gets
the interp as a parm.

bruce



Relevant Pages

  • Re: Scheduled script problem
    ... A vbs script that sets up a command to run a batch file, calls EXEC on the ... until the scheduler stops the script after the maximum allowed time to run. ...
    (microsoft.public.windows.server.scripting)
  • Re: Why doesnt foreach return a value
    ... Every Tcl command is implemented as a C level function. ... What we want at the script level is the ... What changes occur is very specific to the context. ...
    (comp.lang.tcl)
  • Re: No argv, argc for worker thread
    ... I expected that a Tcl interpreter started in any manner would accept options ... This is how the interpreter works with command line options ... a "main" script processes command line ...
    (comp.lang.tcl)
  • Re: Scheduled script problem
    ... A vbs script that sets up a command to run a batch file, calls EXEC on the ... until the scheduler stops the script after the maximum allowed time to run. ...
    (microsoft.public.windows.server.scripting)
  • Re: How will I execute an expect script from a tcl script?
    ... But while trying execute in both ways from tcl script the tcl script ... If you start the exec ... must ensure that what you source or your driver script has "package ...
    (comp.lang.tcl)