Ask Your Question

Alex Kramer's profile - activity

2012-09-23 13:45:03 +0200 answered a question What broke?

The problem (which is definitely a regression on our end), is stemming from FigureSize using a generator for a list.

For now, if you change the relevant portion to:

FigureSize =  slider([i +1 for i in xrange(20)], default = 9, label="figure size")

the code works as expected. I've opened a bug report here:

2012-07-31 17:30:35 +0200 answered a question Sagecell kwargs no longer works

I thinkthis is an issue related to a change we made regarding how defining controls in the interact decorator works. I've opened an issue about that behavior here:

In the meantime, since t is being defined in the function globals, you can access it from there (or just by the variable t). One thing you might want to do for now to ensure consistent behavior with local variables and kwargs for the function is to either define all interacted variables in the interact decorator or define all interacted variables in the function itself until the issue is resolved.

2012-06-28 18:38:48 +0200 received badge  Editor (source)
2012-06-28 18:38:32 +0200 answered a question Sage cell server - do I really need so many makeSagecell invocations?

Here's a quick example of some HTML+javascript that automatically makes all elements with a given class into sagecells: (view source to see the JS) ... However, it looks like right now there's some sort of CSS bug that's preventing a lot of debugging-type printing from being dynamically hidden. But it at least shows that what you want is certainly possible to do.

2012-05-29 19:44:03 +0200 received badge  Good Answer (source)
2012-05-01 23:27:51 +0200 received badge  Supporter (source)
2012-05-01 00:01:30 +0200 received badge  Nice Answer (source)
2012-04-30 18:37:03 +0200 answered a question arrange sage interact input elements

You should be able to accomplish this with the layout parameter to @interact. Here's one sample from the interact documentation:

@interact(layout={'top': [['a', 'b']], 'left': [['c']], 'bottom': [['d']]})
def _(a=x^2, b=(0..20), c=100, d=x+1): print a+b+c+d

Nested lists allow specification of both distinct rows of interact controls and distinct elements within each row, which is what I think you're asking about.

2012-03-22 11:48:05 +0200 commented answer Sage cell server install

Hi, I'm one of the developers of the project. We're currently working on simplifying the install process quite a bit and eliminating some of the dependency requirements. For now, you can always embed the sage cell into any webpage you want, though. EDIT: Here's the embedding documentation:, there's a fairly simple example at the bottom of the page.

2012-02-21 15:06:19 +0200 received badge  Good Answer (source)
2012-02-20 10:19:08 +0200 received badge  Nice Answer (source)
2012-02-20 00:56:42 +0200 received badge  Teacher (source)
2012-02-19 23:57:03 +0200 answered a question Is sage supported with javascript?

If what you want to do is 'embed' Sage-specific Python code on a website, execute that code, and have the output of that code displayed, the Sage Cell Server (demo at exists for just this purpose. The current repository is located at and instructions for embedding into arbitrary HTML files are located at The example at the very bottom of that page is probably the easiest way to get started.