#13131: Make a top-level table/Table function
----------------------------------+-----------------------------------------
Reporter: kcrisman | Owner: was
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.9
Component: user interface | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Jason Grout, Karl-Dieter
Crisman
Authors: John Palmieri | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by slabbe):
Thanks for clarifying the documentation of `html(_)` and for making `html`
calling `_html_` if it exists.
I have two questions:
1. Doc of `html` now says:
{{{
In any case, *print* the resulting html string. This method
always *returns* an empty string.
}}}
What if I want to print the output in a file and not in the shell. What
should I do? This is something I came across in the past.
2. I really like the `table` function. I am defining such a function in a
patch I posted just yesterday at #13069. In my case, the function takes
columns as input and not rows. So, if I want to use your code, would you
propose an interface that takes columns as input:
{{{
#!python
sage: columns = [('a', 100, 4), ('b', 2, 5), ('c', 3, 60)]
sage: table(columns=columns)
}}}
or the user should transpose columns into rows himself?
{{{
#!python
sage: columns = [('a', 100, 4), ('b', 2, 5), ('c', 3, 60)]
sage: rows = zip(*columns)
sage: rows
[('a', 'b', 'c'), (100, 2, 3), (4, 5, 60)]
sage: table(rows)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13131#comment:24>
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.