How to flush an output port

Glenn Moloney (glenn@micron.ph.unimelb.EDU.AU)
Fri, 7 Mar 1997 22:40:57 +1100 (EST)

Hi all,

Sorry if this is not an appropriate post to this list, but I can't
sort this one out.

I'm having a little problem with `open-output-pipe'. I've opened a
connection to a gnuplot process via:
(set! gnuplot-port (open-output-file "gnuplot"))

I then write commands to the port using print, etc..., but the command
line does not get flushed to the pipe. I can't find a `flush' function
anywhere. The only solution I can think of is that I must use
`with-output-to-file' so the pipe is the current port. Then `newline'
will flush the port. Unfortunately this means I have to open the file
everytime I send a command. Is there a simple alternative?

Cheers and thanks for any assistance with this,
glenn.

-- 
  Glenn Moloney				glenn@physics.unimelb.edu.au
  School of Physics,			http://www.ph.unimelb.edu.au/~glenn
  University of Melbourne,		Phone: +61 3 9344 5081
  Parkville, Australia 3052.		Fax:   +61 3 9347 4783