Ask Your Question

Publishing a worksheet that uses modules

asked 2015-10-31 14:01:35 -0600

Erel Segal-Halevi gravatar image

updated 2016-06-06 14:44:55 -0600

FrédéricC gravatar image

I wrote a worksheet in the Sage Notebook. Since it was large, I split it into several modules. So now my worksheet looks like this:

load ("/home/erelsgl/git/myproject/ClassA.sage")

... Do some things with class A ...

The file ClassA.sage looks like this:

load ("/home/erelsgl/git/myproject/ClassB.sage")

... Define class A based on class B ...

This works on my computer, but of course it will not work when I publish it on the cloud.

What is the correct way to write my notebook and its modules such that it will be publishable in the Sage cloud?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2015-11-01 10:59:31 -0600

updated 2015-11-02 08:18:38 -0600

On SageMathCloud at, you can make a whole directory public.

That directory can include your .sage files and the .sagews or .ipynb worksheet.

In the .sagews or .ipynb worksheet, just use relative paths for loading.

edit flag offensive delete link more


This works. Thanks!

Erel Segal-Halevi gravatar imageErel Segal-Halevi ( 2015-11-03 14:19:36 -0600 )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


Asked: 2015-10-31 14:01:35 -0600

Seen: 63 times

Last updated: Nov 02 '15