First time here? Check out the FAQ!

Ask Your Question
0

Very strange error with html in sagenotebook

asked 11 years ago

AndreWin gravatar image

Hello!

I have function:

def my_table():
    s = """<table border=1>
    <tr><td>1</td><td>a</td><td>{0}</td></tr>
    <tr><td>2</td><td>b</td><td>{1}</td></tr>
    <tr><td>3</td><td>c</td><td>{2}</td></tr>
    <tr><td>4</td><td>d</td><td>{3}</td></tr>
    <tr><td>5</td><td>e</td><td>{4}</td></tr>
    <tr><td>6</td><td>f</td><td>{5}</td></tr>
    <tr><td>7</td><td>g</td><td>{6}</td></tr>""".format(0, 1, 2, 3, 4, 5, 6)
    html(s)

I create new worksheet in sage notebook, in 1st cell I paste this code. Then I press shift+enter. In 2nd cell I type:

my_table()

and also press shift+enter. Then I press "save and quit". After I closed this worksheet I open it and see that there are 2 tables and cells don't work correctly. When I try evaluate 2nd cell, the sage can't perform calculation.

What do I wrong? Please help me. Thanks.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 11 years ago

ndomes gravatar image

updated 11 years ago

Missing

</table>

at the end of your html table ;-)

Preview: (hide)
link

Comments

Ou! Sorry!) It's so! Fine! Thanks!)))

AndreWin gravatar imageAndreWin ( 11 years ago )

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

Seen: 324 times

Last updated: Jun 29 '13