Ask Your Question

Revision history [back]

Hi, thank you for posting this question. I added the link to the Sage wiki in your question. In general, you should expect most Sage code to work in all settings. But sometimes it's not quite the case. I tried the code: - on my computer in a legacy SageNB notebook worksheet (by running sage -n sagenb) -- it worked - on my computer in a Jupyter notebook worksheet (by running sage -n jupyter) -- it did not work - on CoCalc in a .sagews worksheet -- it did not work - on CoCalc in a .ipynb Jupyter notebook worksheet -- it did not work

Hi, thank you for posting this question. I added the link to the Sage wiki in your question. In general, you should expect most Sage code to work in all settings. But sometimes it's not quite the case. I tried the code: - code:

  • on my computer in a legacy SageNB notebook worksheet (by running sage -n sagenb) -- it worked - worked
  • on my computer in a Jupyter notebook worksheet (by running sage -n jupyter) -- it did not work - work
  • on CoCalc in a .sagews worksheet -- it did not work - work
  • on CoCalc in a .ipynb Jupyter notebook worksheet -- it did not work

Hi, thank you for posting this question. I added the link to the Sage wiki in your question. In general, you should expect most Sage code to work in all settings. But sometimes it's not quite the case. I tried the code:

  • on my computer in a legacy SageNB notebook worksheet (by running sage -n sagenb) -- it worked
  • on my computer in a Jupyter notebook worksheet (by running sage -n jupyter) -- it did not work
  • on CoCalc in a .sagews worksheet -- it did not work
  • on CoCalc in a .ipynb Jupyter notebook worksheet -- it did not work

Here is what William Stein says about this:

If you make a support request we can probably help you rewrite code...

You should definitely not expect everything that worked in sagenb to work anywhere else. For example, the above code only works with sagenb because one day Tom Boothby had the funny idea: heh, if any code running in a cell creates a file as a side effect, let's just show it. There are no other notebook interfaces in existence as far as I can tell that do that -- definitely not sagews, jupyter, .... It seemed like a good idea at the time, but wasn't. :-)

So if I were you I would contact the CoCalc support team and try to get help to rewrite your interact. Let us know here when you have a replacement, and maybe edit the "graphics interacts" wiki page too.