ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 13 Jul 2011 06:54:35 -0500direct result on sagenbhttp://ask.sagemath.org/question/7985/direct-result-on-sagenb/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,Tue, 12 Jul 2011 11:06:07 -0500http://ask.sagemath.org/question/7985/direct-result-on-sagenb/Answer by Volker Braun for <p>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?</p>
<p>Thanks,</p>
http://ask.sagemath.org/question/7985/direct-result-on-sagenb/?answer=12513#post-id-12513You 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. Tue, 12 Jul 2011 23:37:05 -0500http://ask.sagemath.org/question/7985/direct-result-on-sagenb/?answer=12513#post-id-12513Answer by niles for <p>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?</p>
<p>Thanks,</p>
http://ask.sagemath.org/question/7985/direct-result-on-sagenb/?answer=12516#post-id-12516If 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?Wed, 13 Jul 2011 06:54:35 -0500http://ask.sagemath.org/question/7985/direct-result-on-sagenb/?answer=12516#post-id-12516