[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: redirecting output
From: |
Christopher Cramer |
Subject: |
Re: redirecting output |
Date: |
Wed, 3 Apr 2002 14:06:34 -0600 |
User-agent: |
Mutt/1.2.5i |
On Wed, Apr 03, 2002 at 01:28:08PM -0600, Brian wrote:
> I'd like to direct guile output to a known C file descriptor. Can this be
> done??
Use fdopen and set-current-ouput-port. For example:
address@hidden:~$ guile 3> temp.txt
guile> (set-current-output-port (fdopen 3 "w"))
guile> (display "hello there") (newline)
guile> (quit)
address@hidden:~$ cat temp.txt
#<output: standard output /dev/pts/1>
hello there
address@hidden:~$
--
Christopher Cramer <address@hidden> <http://www.pyro.net/~crayc/>
Quoi que vous fassiez, écrasez l'infâme, et aimez qui vous aime.
-- Voltaire