ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 15 Oct 2012 15:24:10 +0200Navigating sage source codehttps://ask.sagemath.org/question/9429/navigating-sage-source-code/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 (http://hg.sagemath.org/sage-main/file/d06cf4b2215d/sage). 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.Mon, 15 Oct 2012 14:20:54 +0200https://ask.sagemath.org/question/9429/navigating-sage-source-code/Answer by kcrisman for <p>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 (<a href="http://hg.sagemath.org/sage-main/file/d06cf4b2215d/sage">http://hg.sagemath.org/sage-main/file...</a>). 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.</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/9429/navigating-sage-source-code/?answer=14151#post-id-14151Look 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.Mon, 15 Oct 2012 14:41:20 +0200https://ask.sagemath.org/question/9429/navigating-sage-source-code/?answer=14151#post-id-14151Comment by rmp251 for <p>Look in <code>SAGE_ROOT/devel/sage/sage</code> for what you linked to, where <code>SAGE_ROOT</code> is your Sage install directory, often called <code>sage-5.2-ubuntu-my_version</code> or something. </p>
<p>Most of the stuff in spkg/standard is the code for all the 90-odd components of Sage. The stuff in the <code>sage-5.2.spkg</code>-style spkg is the stuff for Sage proper.</p>
https://ask.sagemath.org/question/9429/navigating-sage-source-code/?comment=18864#post-id-18864Yes, I guess the source code is provided assuming you want to build it, whereas I just wanted to look at it.Mon, 15 Oct 2012 15:24:10 +0200https://ask.sagemath.org/question/9429/navigating-sage-source-code/?comment=18864#post-id-18864Comment by John Palmieri for <p>Look in <code>SAGE_ROOT/devel/sage/sage</code> for what you linked to, where <code>SAGE_ROOT</code> is your Sage install directory, often called <code>sage-5.2-ubuntu-my_version</code> or something. </p>
<p>Most of the stuff in spkg/standard is the code for all the 90-odd components of Sage. The stuff in the <code>sage-5.2.spkg</code>-style spkg is the stuff for Sage proper.</p>
https://ask.sagemath.org/question/9429/navigating-sage-source-code/?comment=18865#post-id-18865Note 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.Mon, 15 Oct 2012 15:09:16 +0200https://ask.sagemath.org/question/9429/navigating-sage-source-code/?comment=18865#post-id-18865Comment by rmp251 for <p>Look in <code>SAGE_ROOT/devel/sage/sage</code> for what you linked to, where <code>SAGE_ROOT</code> is your Sage install directory, often called <code>sage-5.2-ubuntu-my_version</code> or something. </p>
<p>Most of the stuff in spkg/standard is the code for all the 90-odd components of Sage. The stuff in the <code>sage-5.2.spkg</code>-style spkg is the stuff for Sage proper.</p>
https://ask.sagemath.org/question/9429/navigating-sage-source-code/?comment=18867#post-id-18867Thanks I see that now. But that's from the installation. Why doesn't it give me that when I download the source (http://sagemath.org/download-source.html)?Mon, 15 Oct 2012 15:03:57 +0200https://ask.sagemath.org/question/9429/navigating-sage-source-code/?comment=18867#post-id-18867Answer by John Palmieri for <p>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 (<a href="http://hg.sagemath.org/sage-main/file/d06cf4b2215d/sage">http://hg.sagemath.org/sage-main/file...</a>). 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.</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/9429/navigating-sage-source-code/?answer=14152#post-id-14152If 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](http://hg.sagemath.org/sage-main/file/d06cf4b2215d/sage).Mon, 15 Oct 2012 15:13:17 +0200https://ask.sagemath.org/question/9429/navigating-sage-source-code/?answer=14152#post-id-14152