Ask Your Question

Publishing a worksheet that uses modules

asked 2015-10-31 20:01:35 +0200

Erel Segal-Halevi gravatar image

updated 2016-06-06 21:44:55 +0200

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 17:59:31 +0200

slelievre gravatar image

updated 2015-11-02 15:18:38 +0200

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 21:19:36 +0200 )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 20:01:35 +0200

Seen: 347 times

Last updated: Nov 02 '15