Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can write your reuseable functions into a .sage or .py file, store it anywhere on your computer (or the web), and then somewhere in the worksheet (e.g. the top), have a cell with

%auto
attach('/path/to/my/file.py')

attach will run all the code in your file, every time the file changes, so the functions in the file will be available from the worksheet.