Skip to content

ConvertingSageJupyter

William Stein edited this page Nov 10, 2017 · 3 revisions

Converting between Sage Worksheets and Jupyter Notebooks

To Convert a Sage Worksheet to a Jupyter notebook

By clicking a button...

  1. Open the Sage worksheet
  2. Click the button labeled Jupyter near the top right, right by the printer icon.

By using the command line terminal

  1. Create a terminal in the same directory as your .sagews file.
  2. Type cc-sagews2ipynb "filename.sagews"
  3. Then open the resulting filename.ipynb, e.g., by typing open filename.ipynb or by clicking in the file manager.

To Convert a Jupyter notebook to a Sage Worksheet

By selecting a menu option

  1. Open the Jupyter notebook
  2. Click File --> Download as --> "Sage Worksheet"
  3. In the resulting dialog, when the conversion is complete, click "Edit exported file..." to open the Sage worksheet.

By using the command line terminal

  1. Create a terminal in the same directory as your .ipynb file.
  2. Type cc-ipynb2sagews "filename.ipynb"
  3. Then open the resulting filename.sagews, e.g., by typing open filename.sagews or by clicking in the file manager.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.