This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

open-output-pipe


   From: guile-return-3307-ttn=netcom.com@sourceware.cygnus.com
   Date: Tue, 21 Mar 2000 06:44:26 -0800 (PST)

   (display "Hello, world!" 
      (open-output-pipe "mimencode"))

   should write `SGVsbG8uIHdvcmxkIQ==' to the `current-output-port'?

   It does not.

   It seems, it writes to the "stdout", but I do not understand, how to
   get these data back to guile (in interactive mode, I see the output
   only after finishing guile session).

the port returned by `open-output-pipe' is not closed when `display'
finishes.  buffered output is flushed on close.  try this:

	(let ((out (open-output-pipe "mimencode")))
	  (display "hello world" out)
          (close-pipe out))

i also tried:

	(with-output-to-port (open-output-pipe "mimencode")
	  (lambda ()
	    (display "hello world")
	    (force-output)))

but this did not work for me.

thi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]