Re: Is there a way to make 'wish' read standard input?



suchenwi wrote:
Easy - pedestrianly: at the end of your script, add:
while 1 {
puts -nonewline "% "; flush stdout
gets stdin line
catch $line res
puts $res
}

You need to use something a bit more complex than that, since you need
to write an event-oriented version so that that the event-loop stays
fresh. Many more details at http://wiki.tcl.tk/1968

Donal.

.



Relevant Pages

  • Re: Tilde expansion on (Windows)files?
    ... I think all file commands are affected. ... if {$res} {puts $err} ...
    (comp.lang.tcl)
  • posting form data in ruby 1.8.2?
    ... I'm trying to figure out how to post form data to a url, ... puts res.body ... #I get an error saying there is no content_type= method. ...
    (comp.lang.ruby)
  • Re: combinations listing
    ... I know this post is getting long so ill try to wrap things up with a ... file.each {|p| dict << p} ... puts "Finding All Possible Combinations..." ... store.each {|c| res << c} ...
    (comp.lang.ruby)
  • Re: HTTP::Post - HTTP::Get (Can someone help me?)
    ... add_headers req, ".." ... res = @http.request ... puts res.body ... were you on medication durin your first 3 posts? ...
    (comp.lang.ruby)
  • Re: "rescue Postgres::PGError" not working
    ... puts "Error message: #" ... (I know that the query I am tring to execute will give an exception) ... Is there a different way to handle exception or, ...
    (comp.lang.ruby)