Using stdin / stdout on Unix

Randall Hopper aa8vb at yahoo.com
Thu Oct 28 15:07:27 EDT 1999


Randall Hopper:
 |Dave Cole:
 | |I have only just started to use progress and am trying to make a
 | |program (on Solaris) accept input from stdin and write to stdout.  The
 | |only I have worked out is the following:
 | |
 | |INPUT THROUGH cat NO-ECHO.
 | |OUTPUT THROUGH cat.
 | |
 | |This seems a bit stupid.  Surely there is a way to do the same thing
 | |without having to bounce everything through cat.
 |
 |Sounds like what you seek is called "expect", originating in Tcl-land
 |(IIRC) but I recall seeing references to expect for Python on this list.
 |Search the list archives or the Python web site for this string and you
 |should turn up hits.

For a simpler, lower-level interface, also look at the popen, popen2, and
popen3 APIs.

-- 
Randall Hopper
aa8vb at yahoo.com




More information about the Python-list mailing list