Re: tcl/TK question

2011-06-30 Thread Tom Buskey
Take a look at the expect extension for tcl/Tk. It was created expressly for dealing with interactive programs. On Thu, Jun 30, 2011 at 1:31 PM, Brian St. Pierre wrote: > On Thu, Jun 16, 2011 at 12:41 PM, Jerry Feldman wrote: > > One possible solution that seems to work. In my wrapper script: >

Re: tcl/TK question

2011-06-30 Thread Brian St. Pierre
On Thu, Jun 16, 2011 at 12:41 PM, Jerry Feldman wrote: > One possible solution that seems to work. In my wrapper script: > --arg1 --arg2 2>&1 > > And in the tcl script: > > if [catch {open "|$command"} input] { > > I still get my zombie on the start command, but I query the open file list in

Re: tcl/TK question

2011-06-16 Thread Jerry Feldman
One possible solution that seems to work. In my wrapper script: --arg1 --arg2 2>&1 And in the tcl script: if [catch {open "|$command"} input] { I still get my zombie on the start command, but I query the open file list in tcl (file channels) and close any open files other than stdxxx. It

Re: tcl/TK question

2011-06-16 Thread Jerry Feldman
Basically, I didn't know tcl/tk until a week or so ago although I'm experienced in C/C++/BASH. So, I looked for code that tended to do what I wanted to do. In this case, the code comes from the exelog.tcl program that appears in "Practical Programming in TCL and Tk". Brent's explanation is "If you

Re: tcl/TK question

2011-06-16 Thread Michael ODonnell
> if [catch {open "|$command |& cat"} input] { Curiosity: why do you pipe it through cat? ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

tcl/TK question

2011-06-16 Thread Jerry Feldman
I am using a tcl/tk script to serve as a GUI for an existing BASH system. Essentially, most of the buttons go through a single command processor in tcl. I set up a command as "script name " The code is: if [catch {open "|$command |& cat"} input] { . The script I call is a wrapper BASH script