Ask Your Question
1

Publishing a worksheet that uses modules

asked 9 years ago

Erel Segal-Halevi gravatar image

updated 8 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
3

answered 9 years ago

slelievre gravatar image

updated 9 years ago

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")
Preview: (hide)
link

Comments

This works. Thanks!

Erel Segal-Halevi gravatar imageErel Segal-Halevi ( 9 years ago )

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: 9 years ago

Seen: 506 times

Last updated: Nov 02 '15