Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading from the Stdin

Status
Not open for further replies.

komyg

Programmer
Dec 13, 2005
68
BR
How can I read from the stdin using the Wish84 applicaton?
Because the "gets stdin" command works only for the Tclsh84 application. I've also tryed the expect_user command, but it also only works on Ttclsh84.

PS: I'm talking about Active Tcl from Active State and I'm using Windows Server 2003 Standard.

Komyg
 
within Wish, you can use the console by:
console show

I like to bind that to a function key just in case:
bind . <F5> {console show}

Then, with the console open, you can get use gets stdin as with Tclsh.

_________________
Bob Rashkin
 
I'm sorry but that doesn't work. I'm already using the Wish console, but when I type "gets stdin a" I get a -1 result, wich means that "gets" coludn't read from the stdin.

Thanks,
Komyg
 
I could have sworn I've come across this but a quick check in this forum's archive as well as the Wiki ( turned up bupkis. I quess the question is, if you're using Tk, why not use a widget to get the user input?

_________________
Bob Rashkin
 
I guess you're wright. I began using the Wish84 because it has the only console that fully supports Expect. I wasn't planning on doing any GUI, but a simple widget is not a bad idea, even though I still would like to know how to read from the stdin.

Thanks,
Komyg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top