A Simple Sage Worksheet that creates Sage Worksheets
The write_sagews
function below creates a Sage worksheet with any desired input. It does not yet let you specify the output, though you can put %auto at the start of a cell to evaluate it when the user opens the worksheet (thus generating output).
Note that write_sagews
is pure Python (except %auto); you can copy it into any Python script to generate worksheets.
Test this out -- if it is useful to people, I'll make a more general version just be built into SMC.
Try it out: