Re: Is there a way to make 'wish' read standard input?
- From: "suchenwi" <richard.suchenwirth-bauersachs@xxxxxxxxxxx>
- Date: 28 Nov 2006 04:38:46 -0800
tclin1998@xxxxxxxxx schrieb:
### tt.tcl begin
set a 123
puts $a
### end
On Linux console, I type in
wish tt.tcl
I'll see a window pop up, and the console shows
northstar:/tmp% wish tt.tcl
123
_
However,
I could not get the command prompt % in the console.
Is there a way to get tcl command prompt % in the above scenario ?
Easy - pedestrianly: at the end of your script, add:
while 1 {
puts -nonewline "% "; flush stdout
gets stdin line
catch $line res
puts $res
}
.
- Follow-Ups:
- Re: Is there a way to make 'wish' read standard input?
- From: Donal K. Fellows
- Re: Is there a way to make 'wish' read standard input?
- References:
- Is there a way to make 'wish' read standard input?
- From: tclin1998@xxxxxxxxx
- Re: Is there a way to make 'wish' read standard input?
- From: Aric Bills
- Re: Is there a way to make 'wish' read standard input?
- From: tclin1998@xxxxxxxxx
- Is there a way to make 'wish' read standard input?
- Prev by Date: Re: Is there a way to make 'wish' read standard input?
- Next by Date: Re: Is there a way to make 'wish' read standard input?
- Previous by thread: Re: Is there a way to make 'wish' read standard input?
- Next by thread: Re: Is there a way to make 'wish' read standard input?
- Index(es):
Relevant Pages
|