First time here? Check out the FAQ!

Ask Your Question
1

direct result on sagenb

asked 13 years ago

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,

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 13 years ago

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.

Preview: (hide)
link
0

answered 13 years ago

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?

Preview: (hide)
link

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: 13 years ago

Seen: 491 times

Last updated: Jul 13 '11