#14104: Implement an interface for displaying objects in HTML from the command 
line
----------------------------------+-----------------------------------------
       Reporter:  andrew.mathas   |         Owner:  andrew.mathas
           Type:  enhancement     |        Status:  new          
       Priority:  major           |     Milestone:  sage-5.8     
      Component:  user interface  |    Resolution:               
       Keywords:                  |   Work issues:               
Report Upstream:  N/A             |     Reviewers:               
        Authors:  Andrew Mathas   |     Merged in:               
   Dependencies:                  |      Stopgaps:               
----------------------------------+-----------------------------------------

Comment (by andrew.mathas):

 Replying to [comment:9 slabbe]:

 > {{{
 > #!python

 > def _html_(self):
 >     r"""
 >     Returns html representation.
 >     """
 > }}}

 Yes, I was thinking of this as being a fairly generic interface even
 though it is overkill for most objects. In the related tables patch #14103
 I do have an _html_ method for returning the HTML but it doesn't seem to
 be in this patch so I should add it.

 If there is interest in putting this into sage (and I hope there is:) then
 I agree that finding the right syntax is important. The existing html()
 already returns html for the object if it has an _html_ method, and in the
 notebook this html is displayed. One option possibility is to piggy-back
 off te current function and have html(), by default, open a browser from
 the command line and also give it the option of writing to a file or
 simply printing the html -- and leave he default behaviour in the notebook
 unchanged except that these extra options would be provided there as well.

 Another possibility would be to use view() or show(). Arguably there are
 already too many commands for displaying sage objects in slightly
 different ways so it is worth thinking this through properly.
 The html_display method currently wraps its contents into a sectioned web
 page in the format of the manuals...s that too much?

 I didn't know about the browse_sage_doc method. I will have a look with
 it.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14104#comment:10>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to