Ask Your Question

Sage interact slider and textbox

asked 2011-11-18 23:31:15 -0500

sagefan gravatar image

In sage interact, I want to have a slider and a little textfield which displays the current value of the slider and conversely if I change the value of the textfield, the slider changes to that value.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2011-11-19 01:45:46 -0500

Jason Grout gravatar image

updated 2011-11-19 01:45:58 -0500

Check out the singlecell. It has a new implementation of interacts which has this:

Go to and do:

def _(n=(0,100)):
    print n

Just click on the number to change it.

edit flag offensive delete link more


Hm. Thanks, but this doesn't work for my local sage installation (version 4.7.1)

sagefan gravatar imagesagefan ( 2011-11-19 07:14:41 -0500 )edit

How to get the syntax highlighting in input cells as in your example on ?

sagefan gravatar imagesagefan ( 2011-11-19 07:46:40 -0500 )edit

The singlecell has a new implementation of interacts that is not in Sage yet. It also uses a syntax-highlighted editor that is not in Sage. The singlecell is for embedding Sage calculations in web pages. My point is that it is coming to Sage, but hasn't been added to the released version of Sage yet.

Jason Grout gravatar imageJason Grout ( 2011-11-21 18:33:02 -0500 )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


Asked: 2011-11-18 23:31:15 -0500

Seen: 407 times

Last updated: Nov 19 '11