#17942: save() should download files in the notebook
------------------------------+----------------------------
Reporter: vbraun | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.6
Component: user interface | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------------+----------------------------
In a browser-based notebook an object's `save()` method should
automatically download the saved file and not just let it linger on the
remote server.
I'm proposing to do this by returning, from `save()`, a `SavedFile` object
instead of nothing. The `SavedFile._rich_repr_` method then returns a
custom rich representation which gives browser-based display backends a
hook to do something with the saved file. Also, nothing happens if you
call save() from within code---only if it hits the displayhook:
{{{
sage: my_plot.save() # yes, download
sage: _ = my_plot.save() # no automatic download
sage: for i in range(10):
....: my_plot.save() # depends
sage: for i in range(10):
....: my_plot.save() # no
....: x = x + i
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17942>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.