guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read-string!/partial on non-file ports


From: Stephen Compall
Subject: Re: read-string!/partial on non-file ports
Date: Mon, 10 Sep 2007 14:51:32 -0500

On Mon, 2007-09-10 at 12:25 -0700, Luigi Semenzato wrote:
> I would like to move binary data between two guile
> applications across a pipe (opened with open-input-output-pipe).
> Read-char and write-char in a loop are going to be too slow.
> Read-string!/partial and write-string/partial are exactly what
> I need but they only work on file ports.  (I get this error:
> Wrong type argument in position 2 (expecting open file port):
> #<input-output: soft 56f1d0>).
> 
> 1. Do I have other choices?  I cannot find any.

How about display?

 -- Scheme Procedure: display obj [port]
     Send a representation of OBJ to PORT or to the current output port
     if not given.

     The output is designed for human readability, it differs from
     `write' in that strings are printed without doublequotes and
     escapes, and characters are printed as per `write-char', not in
     `#\' form.

-- 
;;; Stephen Compall ** http://scompall.nocandysw.com/blog **
"Peta" is Greek for fifth; a petabyte is 10 to the fifth power, as
well as fifth in line after kilo, mega, giga, and tera.
  -- Lee Gomes, performing every Wednesday in his tech column
     "Portals" on page B1 of The Wall Street Journal

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]