1 | initial version |
There is no simple solution with the Sage notebook. You can save your worksheet as an .sws
file and then from the command line do sage -sws2rst your_worksheet.sws
to get an rst
file, so that it is easier to post-process the text file to obtain a genuine Python file (this can then easily be done sine you just have to select lines that start either with <space><space><space><space>sage:<space>
or with <space><space><space><space>...<space><space>
).
It is easier with the jupyter notebook:
2 | No.2 Revision |
There is no simple solution with the Sage notebook. You can save your worksheet as an .sws
file and then from the command line do sage -sws2rst your_worksheet.sws
to get an rst
file, so that it is easier to post-process the text file to obtain a genuine Python file (this can then easily be done sine since you just have to select lines that start either with <space><space><space><space>sage:<space>
or with <space><space><space><space>...<space><space>
).
It is easier with the jupyter notebook: