Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

store python code from a notebook cell to a file

During a notebook session I enter a series of SAGE-statements (python code) in a notebook cell. How can I let SAGE store/save this code automatically (not via copy&paste) in a file? The purpose is to reload the stored code in a cell of another session for later processing . I tried to perform this via the "save-session" -command. However, this results in a data volume of several MB, which is much larger than the total length of the code of the session. This I want to avoid.