guile-user
[Top][All Lists]
Advanced

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

Re: Loading and saving scheme expressions


From: Bobby D. Bryant
Subject: Re: Loading and saving scheme expressions
Date: Sun, 9 Jun 2002 12:53:13 -0600

On 2002.06.09 00:48:59 -0600 Thien-Thi Nguyen wrote:

how about:

 (define (load-expr file)
   (read (open-file file OPEN_READ)))

 (define (save-expr file value)
   (write value (open-file file OPEN_WRITE))
   (flush-all-ports))

Is there a way to force pretty-printing to the file? I've been using GUILE for things like user preferences, but if the program modifies it and writes it back to the file then it has to be re-formatted for human consumption (e.g., if the user wants to hand-edit his/her preferences).

Thanks,

Bobby Bryant
Austin, Texas


reply via email to

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