home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / tcl / 1241 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.5 KB

  1. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!mips!swrinde!gatech!cc.gatech.edu!cloudgen1!clayton
  2. From: clayton@cloudgen1.gatech.edu (R. Clayton)
  3. Newsgroups: comp.lang.tcl
  4. Subject: How to expect.
  5. Message-ID: <1992Aug21.164145.11775@cc.gatech.edu>
  6. Date: 21 Aug 92 16:41:45 GMT
  7. Sender: news@cc.gatech.edu
  8. Organization: College of Computing, Georgia Institute of Technology
  9. Lines: 19
  10.  
  11. I have a program that presents text a screen at at time.  I have an expect
  12. front-end to the program that issues a sequence of page commands, picks apart
  13. the screens and prints the resulting text with send_user.  I'd like to run the
  14. text through a pager (e.g., more) so the user can control the spew of text, but
  15. am unsure how to go about it.
  16.  
  17. One thing I could do is write the text to a file, spawn a pager on the file,
  18. and then let the user interact with the pager.  This is the effect I want, but
  19. I don't want to have the user sitting around waiting while the script writes
  20. 400+ pages to a file.  Another possibility is to fork with the file writer in
  21. one copy and the pager in the other, but this raises coordination problems
  22. (e.g., when the user pages to the current end-of-file before the writer
  23. finished writing the file) in addition to the fact that I haven't been able to
  24. get sample scripts written in this style to work.  A third possibility is to
  25. make a pipeline with the pager and multiplex between the two tasks in the
  26. script itself, but I haven't been able to come up with a multiplexing scheme
  27. that doesn't involve re-implementing the pager in the script.
  28.  
  29. Any ideas?
  30.