ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 09 Feb 2016 21:15:20 +0100init.sage doesn't work for the notebook server?https://ask.sagemath.org/question/32513/initsage-doesnt-work-for-the-notebook-server/Hello!
I have the same problem as in [Is there a way to prefix all sage code in order to include a custom module?](http://ask.sagemath.org/question/8407/is-there-a-way-to-prefix-all-sage-code-in-order-to-include-a-custom-module/), but the init.sage appears not to work with notebook's worksheet. Here is what I have:
$ cat ~/.sage/init.sage
import numpy as np
then inside Sage I have:
$ ./sage
sage: np
<module 'numpy' from ....>
But then I run notebook() and create a new worksheet, inside that worksheet session:
np
NameError: name 'np' is not defined
So I assume that **the script was not executed for the worksheet**.
Is there a way to create sage.init but for the worksheets?EugeneTue, 09 Feb 2016 21:15:20 +0100https://ask.sagemath.org/question/32513/Attaching files in notebook does not update contentshttps://ask.sagemath.org/question/25611/attaching-files-in-notebook-does-not-update-contents/ Hello, I am running Sage 6.4.1. Using the notebook interface, attaching files does not work as the files contents are not reloaded automatically. It just shows me the previous variable values.
echo "x=2" > foo.py
attach foo.py
x
2
echo "x=4" > foo.py
x
2
As you can see the value of x isn't updated to 4. I can confirm that attach works as intended on the terminal, just the notebook interface is broken.NahsiNTue, 27 Jan 2015 04:30:02 +0100https://ask.sagemath.org/question/25611/