On Sep 3, 11:13 am, Simon King <simon.k...@nuigalway.ie> wrote:
> Probably not. I guess what I am asking is whether the functionality of
> the sage-test script is available as a function that can be imported
> into sage.

Since up to now no-one seems to be able to answer that question, I'll
speculate. Given what it's supposed to do, I think it's hard to
replicate without spawning a process: "sage -t" is supposed to compare
the results on stdout (and stderr?) to a template. The most
straightforward way of doing that is to run a subprocess with
redirected stdout/stderr (to either a pipe or a temporary file). In
principle you could redirect stdout/stderr of the process itself and
run the example there, but the logic would quickly get complicated and
if something goes wrong, reporting errors to a sane place becomes
hard. I haven't actually looked at the code, so if you find out
otherwise, I'd be interested in seeing how these problems are
circumvented.

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to