Ask Your Question

Is sage supported with javascript?

asked 2012-02-19 15:12:08 +0200

anonymous user


If I am converting Python code to JavaScript, will it preserve the Sage functions and stuff? If so, which conversion tool is best?

Perhaps a better question: More generally, what do people think is the best way to implement Python code w/ Sage on a website?

edit retag flag offensive close merge delete


What functions do you use in Sage? I'm no Sage expert, but as far as I know, Sage pulls from lots of different libraries.

SirFibonacci gravatar imageSirFibonacci ( 2012-02-19 17:53:18 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-02-19 23:57:03 +0200

Alex Kramer gravatar image

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.

edit flag offensive delete link more


That is nice, but wish it was some what simpler. It would be nice if there was a simple way of embedding a sage cell in webpage just for sage marketing purpose.

Shashank gravatar imageShashank ( 2012-02-20 00:58:16 +0200 )edit

@Alex - I think you can do what Shashank wants as well with this, right?

kcrisman gravatar imagekcrisman ( 2012-02-20 12:52:44 +0200 )edit

@Shashank - how much simpler are you wanting? You copy and paste several lines from the example page and that's it to embed a Sage compute box into a webpage.

Jason Grout gravatar imageJason Grout ( 2012-02-20 23:00:11 +0200 )edit

I am sorry. I just realised that I can use the aleph server on my webpage. It took me less than a minute to do it. I made that comment thinking that a sage server has to be setup on my apache server to embed a sage cell.

Shashank gravatar imageShashank ( 2012-02-25 19:52:00 +0200 )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: 2012-02-19 15:12:08 +0200

Seen: 1,019 times

Last updated: Feb 19 '12