Ask Your Question
0

Load module from remote server

asked 2018-09-27 10:38:06 +0100

jllb gravatar image

Hi, I am using a remote sage notebook public server (such as http://sage.math.canterbury.ac.nz/). I would like to be able to load my own python modules, but I don't know how can I access local files, such as

import sys
sys.path.append('path-to-file-in-my-local-drive')
import module-name

Is there any way to do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-09-28 03:35:27 +0100

kcrisman gravatar image

You will have to upload them as data to your worksheet, which should be relatively straightforward in that interface. (One of the things the old Sage notebook does better in some ways than the Jupyter notebook.) Note that you will have to use an auxiliary variable DATA - see the help link in the notebook for details.

(If you had something available on the web that might be different, by the way; there could be a way to ask Python to access that remote file, I think.)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-09-27 10:38:06 +0100

Seen: 440 times

Last updated: Sep 28 '18