Ask Your Question
0

Sage notebook table output

asked 2012-12-20 10:14:51 +0100

ISE gravatar image

If I use pretty_print() or view(), I am not able to use visual intendation by tabulation symbols in the notepad.

So, how to make SAGE notebook use HTML tables or similar formatting for its output?

Is there a way to get HTML-code from the pretty-printing commands to use it with normal strings for the output, formatted as I need?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-12-20 10:48:46 +0100

ppurka gravatar image

There is a html.table() command to which you can provide lists of lists and it will display them as a table. For example:

html.table([['header 1', 'header 2', 'header 3'], range(3), range(3, 6)])

If you do this on the command line, you will actually get the raw html output.

edit flag offensive delete link more

Comments

1
kcrisman gravatar imagekcrisman ( 2012-12-20 13:11:43 +0100 )edit

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: 2012-12-20 10:14:51 +0100

Seen: 1,500 times

Last updated: Dec 20 '12