CoCalc Shared Filessupport / 2018-06-12-sage-code / notebook.ipynbOpen in CoCalc with one click!
Author: William A. Stein
License: GNU General Public License v3.0
Description: Examples for support purposes.

SADLY, attach does not work with Jupyter and Sage, but load does...

See https://github.com/sagemathinc/cocalc/issues/2916

In [1]:
attach('code.sage')
UsageError: Invalid GUI request 'sage', valid ones are:['osx', 'widget', 'qt5', None, 'qt', 'nbagg', 'gtk', 'qt4', 'gtk3', 'notebook', 'tk', 'ipympl', 'inline', 'asyncio', 'wx']
In [2]:
foo(10)
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-2-85fb32452c6e> in <module>() ----> 1 foo(Integer(10)) NameError: name 'foo' is not defined
In [9]:
load('code.sage')
In [10]:
foo(10)
12
In [ ]: