Re: tcl/TK question

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

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 br...@bstpierre.orgwrote: On Thu, Jun 16, 2011 at 12:41 PM, Jerry Feldman g...@gapps.blu.org wrote: One possible solution that

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 command - from the button pressed command options The code is: if [catch {open |$command | cat} input] { .

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/

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 do

Re: tcl/TK question

2011-06-16 Thread Jerry Feldman
One possible solution that seems to work. In my wrapper script: command --arg1 --arg2 21 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.