First time here? Check out the FAQ!

Ask Your Question
0

Interacts not working in IPython notebook

asked 10 years ago

jaia gravatar image

I'm running Sage 6.4.1 (on Ubuntu 14.04 and Firefox 34.0) and using the IPython notebook. It's a great interface, but interactives aren't working. For example, the following brings up a bunch of HTML rather than an actual interactive.

@interact
def test(a=(-3,3)):
    p=plot(a*sin(x), (x,-2*pi, 2*pi))
    show(p)

Do interactives work differently in the IPython notebook?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 10 years ago

tmonteil gravatar image

updated 10 years ago

Yes, the @interact decorator is (currently) specific to the standard Sage notebook, since it produces raw html that is escaped by ipython notebook. If you want to have interacts within ipython notebook right now, you can have a look at this page and this example page.

On the Sage development side, there is still some work to get the best of both.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 10 years ago

Seen: 941 times

Last updated: Dec 25 '14