Reputation: 21
I am new to Sage & I wish to load a .sage
file from a Sage Notebook worksheet
.
I am on OSX 10.9.5
.
If I evaluate
load (example.sage)
I get
IOError: did not find file 'example.sage' to load or attach
The example file is on my Desktop.
Do I need to explicitly state the full file path? If so how? Thx.
Upvotes: 2
Views: 2378
Reputation: 3453
There are two ways to load that file located on your desktop.
One way is using ~
to denote your home directory:
load('~/Desktop/example.sage')
The other one is to use the full path:
load('/Users/username/Desktop/example.sage')
(replacing username
by your actual username).
Upvotes: 3