Re: TIP #199: Specification of Alternatives to .wishrc/.tclshrc
From: R. T. Wurth (rwurth_at_att.net)
Date: 05/18/04
- Next message: Kiran Madabhushi: "Reading files in tcl that are unicode encoded"
- Previous message: Andreas Leitgeb: "Re: TIP #199: Specification of Alternatives to .wishrc/.tclshrc"
- In reply to: Bryan Oakley: "Re: TIP #199: Specification of Alternatives to .wishrc/.tclshrc"
- Next in thread: Bob Techentin: "Re: TIP #199: Specification of Alternatives to .wishrc/.tclshrc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 May 2004 10:14:47 GMT
In article <eIdqc.9547$6R5.4870@newssvr24.news.prodigy.com>, Bryan Oakley <bryan@bitmover.com> wrote:
> R. Timothy Edwards wrote:
>
> > It is possible to run an application from a terminal that starts up a
> > GUI or other event-based process but that, after setting up the event
> > callback procedures, drops back into the terminal to allow a dual-input
> > interface. As written, the only way to execute a script and return to
> > the interpreter prompt in the terminal is to put the script in the
> > ".wishrc" or ".tclshrc" startup script.
>
> Interesting; I've never heard of anyone doing that before (but I don't
> get around that much...)
>
> Wouldn't a better solution be to add a new tcl command that gives the
> same net effect? That is, start up a wish script as usual, then if you
> do something like "interactive true" tcl will read from stdin and print
> to stdout.
>
Have you investigated the Tclx [commandloop] command? It starts
the event loop (if one isn't already running) and starts reading
commands from stdin. I use it for debugging extensively, mostly
via a tiny script that starts my commandloop "after idle", then
sources the desired script. I've been thinking about including
this directly in future applications to be invoked via a -debug
argument or a DEBUG environment variable instead of starting
it through a helper script.
-- Rich Wurth / rwurth@att.net / Rumson, NJ USA Consultant to the telecom industry
- Next message: Kiran Madabhushi: "Reading files in tcl that are unicode encoded"
- Previous message: Andreas Leitgeb: "Re: TIP #199: Specification of Alternatives to .wishrc/.tclshrc"
- In reply to: Bryan Oakley: "Re: TIP #199: Specification of Alternatives to .wishrc/.tclshrc"
- Next in thread: Bob Techentin: "Re: TIP #199: Specification of Alternatives to .wishrc/.tclshrc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|