using a sage function standalone within python

tipu picture tipu · May 13, 2012 · Viewed 8.8k times · Source

There is a function within sage, latex, that I want to use in directly from the command line, without dropping into sage the sage client. one way I think this may be possible is to include that sage module into my python script.

using pip install sage doesn't work.

any ideas?

Answer

kcrisman picture kcrisman · May 17, 2012

You can't just install Sage as a package with a package, and there is tons of non-Python code in Sage, so it would be hard to do this a priori.

However, you can call Sage from a script pretty easily. Here is an example.

For anyone finding this, in general ask.sagemath.org is going to be a quicker way to get responses - I didn't even know that stackoverflow had a Sage tag.