reading from stdin

From: Erik Ostrom <>
Date: Tue, 13 Aug 1996 18:22:27 -0400 (EDT)

Has anyone else had trouble doing this? I would like to be able to
write a script that does something like this (only more useful):

  #!/home/eostrom/apps/irix/STk-3.1-loon/bin/stk -f
  (text '.t)
  (pack .t)
  (let loop ((line (read-line)))
    (if (not (eof-object? line))
          (.t 'insert 'end line)
          (.t 'insert 'end "\n")
          (loop (read-line)))))

... but none of the input ever seems to get there. (A Tk window comes
up, and the text widget appears; but nothing else happens until I
delete the window, no matter how much input I give it, and then when I
delete the window, the loop exits.)

Is there a simple fix for this? Really, I need to use when-port-ready
instead of a blocking read-line loop, but I'd be happy with any
working input as a start.

Thanks for any help
Received on Wed Aug 14 1996 - 00:26:25 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST