First time here? Check out the FAQ!

Ask Your Question
0

Sage notebook table output

asked 12 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

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.

Preview: (hide)
link

Comments

1

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: 12 years ago

Seen: 1,538 times

Last updated: Dec 20 '12