Ask Your Question
1

direct result on sagenb

asked 2011-07-12 11:06:07 -0500

ted gravatar image

I am running some lengthy calculations on the Sage Notebook, and I want to access them later on another client terminal that doesn't have a browser. Is there some ways you can "ask" the Sage Server and it gives the result? If not, is there a way to direct result to another client terminal?

Thanks,

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2011-07-12 23:37:05 -0500

Volker Braun gravatar image

You can pickle the resulting object and then read it into another Sage session, if that is your question.

For example, in the first Sage session:

sage: result = 42
sage: result.dumps()
'x\x9ck`J.NLO\xd5+\xca\xccK/\xd6\xcb\xcc+IMO-\xe2\xcaM\xccN\x8d\x87q\n\x19C\x99\x0c\x13[\x83\n\x99\xf4\x00\x88\x14\x0f\xc5'

Then you can load the pickled object in another session:

sage: loads('x\x9ck`J.NLO\xd5+\xca\xccK/\xd6\xcb\xcc+IMO-\xe2\xcaM\xccN\x8d\x87q\n\x19C\x99\x0c\x13[\x83\n\x99\xf4\x00\x88\x14\x0f\xc5')
42

For simplicity I used dumps/loads to save/load strings. If you have large objects you probably want to use dump/load and save the data to a file. Of course you need file system access on the Sage server, then.

edit flag offensive delete link more
0

answered 2011-07-13 06:54:35 -0500

niles gravatar image

If you're running lengthy calculations, maybe the command-line interface is better than the notebook. Or are you using one of the public Sage notebook servers, rather than a local copy?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-12 11:06:07 -0500

Seen: 139 times

Last updated: Jul 13 '11