(I tried to send something like this yesterday, but it looks like it didn't
go through; apologies if it did and this is a duplicate.)
I can't seem to read from the standard input. Basically what I would
like to do is something like this:
#!/home/eostrom/bin/share/stk -f
(text '.t)
(pack .t)
(let loop ((line (read-line)))
(if (not (eof-object? line))
(begin
(.t 'insert 'end line)
(.t 'insert 'end "\n")
(loop (read-line)))))
What I think this should do is read lines in and put them into a text
widget. But when I run this with some sample input, the input never
seems to get there. The text widget comes up and stays empty until I
close it, and then the program exits.
Am I just doing something wrong? Or is this a known problem? Is there
a known fix? I'd really like to be able to read from stdin. (Actually,
I need to be able to do non-blocking input, since it's an interactive
program, but getting any input at all would be a good start.)
Thanks for any help
--Erik
Received on Wed Aug 14 1996 - 16:44:04 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST