Ask Your Question
1

Publishing a worksheet that uses modules

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

Erel Segal-Halevi gravatar image

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

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
3

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

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

On SageMathCloud at cloud.sagemath.com, 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.

load("ClassB.sage")
edit flag offensive delete link more

Comments

This works. Thanks!

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

Stats

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

Seen: 99 times

Last updated: Nov 02 '15