Skip to main content
\( \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section6Hacking on Sage

DEMONSTRATION: Modifying Sage source code.

  • Location of catalan_number() (bottom of source with ?? query)
  • Edit: SAGE_ROOT/src/sage/combinat/combinat.py
  • Change: add print "Hello, AIMS!" to def catalan_number():
  • Rebuild: ./sage -b at SAGE_ROOT
  • Run: ./sage at SAGE_ROOT
  • Test: ./sage -t SAGE_ROOT/src/sage/combinat/combinat.py