Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

From the command line, you can define your classes/functions/variables within a my_file.sage and attach it to your session by typing:

sage: %attach /path/to/my_file.sage

and then, the file is executed. It is re-executed each time you save the file, so that you do not have to re-load it again.

click to hide/show revision 2
No.2 Revision

From the command line, you can define your classes/functions/variables within a my_file.sage and attach it to your session by typing:

sage: %attach /path/to/my_file.sage

and then, the file is executed. It is re-executed each time you save the file, so that you do not have to re-load it again.

If you do not want the sage preparser to take effect so that your file is understood as a python file, you should name your file my_file.py.