Ask Your Question
0

Load module from remote server

asked 6 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 6 years ago

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.)

Preview: (hide)
link

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

Seen: 480 times

Last updated: Sep 28 '18