[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] output capture
From: |
daly |
Subject: |
[Axiom-developer] output capture |
Date: |
Sat, 21 May 2005 23:04:57 -0500 |
Perhaps you could rebind the output stream?
I'm not sure if *standard-output* is used. But the idea is:
)lisp
(progn
; we need a new output stream
(setq tmpout (make-string-output-stream))
; we hold on to the regular output stream
(setq save *standard-output*)
; we capture the regular output stream in our string-stream
(setq *standard-output* tmpout)
; we generate output
(|parseAndInterpret| "(x+1)^9")
; we get the output strings
(setq result (get-output-stream-string tmpout))
; restore the regular output stream
(setq *standard-output* save)
; and return the strings
result)
There should be several lines written to tmpout and returned in result.
I'm not sure that axiom uses *standard-output* but the output stream
must exist somewhere. I'll look at the code tomorrow. Gotta get back
to packing.
t
- [Axiom-developer] output capture,
daly <=