@interact sage notebook

Skip to first unread message


Oct 21, 2009, 7:51:09 AM10/21/09
to sage-support
Hi, first time here. First of all i want to point out that we've been
using Sage in our University for some math subjects and it's a great
math program, really helps a lot. But now i'm trying to go a little
beyond the basics that we use everyday and try to do something more
like a "program".
I want to know if there is any way to "create" new buttons while
already in execution.
This is a testing code i wrote (of course, just for testing
purposes :P)

def _(n1=input_box(0,label='Testing', type=int),a=selector([1,2,7],
buttons=True), n2=input_box(1,label='Testing2',type=int),
print 'hi'

def another_function(t1=input_box(0,label='Testing123')):
print 'hola'

Thing is, when i run it, i can get it to print 'Hola' but no input_box
is created again. I've managed to "make" one using html, but i can't
get to "interact" with it.
What i'm thinking on doing is a program that has several options using
a selector, e.g. if you choose 1 then it should appear a grid so that
when u enter matrix values it does some calcs, if you choose 2 then it
should appear an input box, and so on...


Oct 21, 2009, 11:33:17 AM10/21/09
to sage-support
Thanks for choosing Sage! You may be interested in letting us know
where you're located etc.

At this point, I do not believe one can make selectors depend on each
other. That said, the feature has been requested before (actually, a
slightly different one), and we are tracking the issue here:


Please let us know if you find something that does work for this!
Good luck.

- kcrisman


Oct 22, 2009, 7:34:28 AM10/22/09
to sage-support
Ok, thanks for the answer. I'm in Montevideo, Uruguay. The University
i'm talking about is "Universidad Católica del Uruguay Dámaso Antonio
Larrañaga" (the Catholic University of Uruguay). We use either Sage or
Maxima (whatever the wants to use) as a tool for Calculus 2, still we
get to learn both since they teach both :P. I'm in Computer Science
career (first year), mainly we use java for programming (now also
prolog) but we learned some python basics (really basics :P) to be
able to use Sage properly.
Well, good to know ur working on that :D:D I'll try to sort it out, if
i get to do it, i'll let you know.
Reply all
Reply to author
0 new messages