[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] capturing output strings
From: |
daly |
Subject: |
[Axiom-developer] capturing output strings |
Date: |
Sat, 21 May 2005 23:34:53 -0500 |
ok, so who needs to pack? :-)
Axiom's algebra gets output to a stream called |$algebraOutputStream|
Thus you can get the output you want by:
)set message autoload off
)lisp (progn
(setq tmpout (make-string-output-stream))
(setq save |$algebraOutputStream|)
(setq |$algebraOutputStream| tmpout)
(|parseAndInterpret| "(x+1)^9")
(setq result (get-output-stream-string |$algebraOutputStream|))
(setq |$algebraOutputStream| save)
result)
)lisp result
result contains the output from axiom that you want.
t