Ask Your Question

Navigating sage source code

asked 2012-10-15 07:20:54 -0500

rmp251 gravatar image

I'm thoroughly confused by the source code. I've downloaded and unpacked all the source code in spkg/standard and spkg/base, but what I get looks totally different from what I see when browsing the code online ( Can someone please help me make sense of the source code? I just want to be able to navigate through the code that gets executed when some sage commands are invoked.

Thank you.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2012-10-15 08:13:17 -0500

If you've downloaded the source code for Sage but haven't built Sage yet (by typing 'make'), then as kcrisman says, the source code for the Sage library is packaged in SAGE_ROOT/spkg/standard/sage-5.2.spkg. So you could do this (starting from SAGE_ROOT):

$ cd spkg/standard
$ tar xfj sage-5.2.spkg
$ cd sage-5.2/sage

Then you can browse through the source code as found on line.

edit flag offensive delete link more

answered 2012-10-15 07:41:20 -0500

kcrisman gravatar image

Look in SAGE_ROOT/devel/sage/sage for what you linked to, where SAGE_ROOT is your Sage install directory, often called sage-5.2-ubuntu-my_version or something.

Most of the stuff in spkg/standard is the code for all the 90-odd components of Sage. The stuff in the sage-5.2.spkg-style spkg is the stuff for Sage proper.

edit flag offensive delete link more


Thanks I see that now. But that's from the installation. Why doesn't it give me that when I download the source (

rmp251 gravatar imagermp251 ( 2012-10-15 08:03:57 -0500 )edit

Note that if you've just downloaded the source code, there may not be anything in `SAGE_ROOT/devel/sage/sage`: it gets put there when Sage is built.

John Palmieri gravatar imageJohn Palmieri ( 2012-10-15 08:09:16 -0500 )edit

Yes, I guess the source code is provided assuming you want to build it, whereas I just wanted to look at it.

rmp251 gravatar imagermp251 ( 2012-10-15 08:24:10 -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: 2012-10-15 07:20:54 -0500

Seen: 277 times

Last updated: Oct 15 '12