output options for sagecell

asked 2021-04-13 11:01:52 +0200

Philipp M gravatar image

I'm working on a project where one program communicates to a sagecell server to calculate certain formulas. I managed to use the web api of sagecell to compute requests but the problem is that the output is meant to be displayed and not further used by a program.

For the request:

a = solve(x^2 + 3*x + 2, x);
print(a)

I receive this output:

{
  execute_reply: {
    status: 'ok',
    execution_count: 1,
    user_expressions: {},
    payload: []
  },
  success: true,
  stdout: '[\nx == -2,\nx == -1\n]\n'
}

My question is now, is there a way to get something like a JSON output or anything else that is computer readable and does not require to be parsed?

edit retag flag offensive close merge delete