Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This may not be the "right way" to do it, but here is what I do:

In my home directory, in the .sage subdirectory I have the following "init.sage" file:

CODE = '/home/mike/Projects/Sage/'
attach CODE+'defaults.sage'

Everything that I always want is in defaults.sage. Then in a particular sage program, I do something like:

attach CODE+'Differential_Equations/series.sage'
attach CODE+'Differential_Equations/pde_misc.sage'
attach /home/mike/Projects/Science/Electrodynamics/Electrostatics.sage

Note that while a couple of the things I needed were in my default "CODE" place, one of them was just in a random directory, so I had to include the whole path.

This certainly isn't perfect, but it's the best thing that I have found to do. I would also be interested in hearing other ideas. Figuring out the best was to "organize" my sage code has been an ongoing issue for me. I have never found a reasonable way to do it for sage notebooks.