Ask Your Question

sagews and sws file format specification

asked 2016-02-20 16:04:22 +0100

candide gravatar image


In order to generate programmaticaly sage worksheet files (using a script) I need to check the sagews/sws formats grammar. Is the specification available somewhere? I need a kind of description similar to the IPython notebook format as described here.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-20 23:06:10 +0100

tmonteil gravatar image

If you want to generate sws worksheets, i would suggest to first generate ReStructuredText (which is well specified) and then use:

sage -rst2sws file.rst file.sws

Code blocks are of the form


    sage: a = 1+1
    sage: a
edit flag offensive delete link more


Excellent suggestion, thanks!

candide gravatar imagecandide ( 2016-02-22 02:21:14 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-02-20 16:04:22 +0100

Seen: 737 times

Last updated: Feb 20 '16