Loading a sage worksheet inside a notebook

28 views
Skip to first unread message

Cyrille Piatecki

unread,
Oct 11, 2019, 8:23:15 AM10/11/19
to sage-s...@googlegroups.com
Hello,

dispite all my effort under windows 10, I am not able to load any
notebook inside a current notebook with the command load(). I hav tried
"c://..." c:/..." "c:\\...". From this I cannot explain to sage that
Gurobi is on my computer. What can I do ?

Nils Bruin

unread,
Oct 12, 2019, 2:04:11 AM10/12/19
to sage-support
For one thing, I don't think you can load *notebooks* with the "load" command.  

From the help that you can get on "load" by typing in "load?":

   Load Sage object from the file with name filename, which will have
   an ".sobj" extension added if it doesn't have one.  Or, if the
   input is a filename ending in ".py", ".pyx", ".sage", ".spyx",
   ".f", ".f90" or ".m", load that file into the current running
   session.

Notebooks usually use the ".ipynb" extension, which is not mentioned. The "ipynb" are handled by jupyter, not by sage, so that's why the sage command "load" doesn't have a clue about what to do with "ipynb" files.

If paths are actually the problem, I'd probably try if *writing* a file does work. For instance, do something like

save("we write this string to a file", "string_object.sobj")

and if that succeeds, see where the file "string_object.sobj" was written. One would expect that

load("string_object.sobj")

should then work too.
Reply all
Reply to author
Forward
0 new messages