init.sage not attached in notebook in sage 4.3.1 (mac os x intel)

8 views
Skip to first unread message

felix

unread,
Jan 24, 2010, 5:06:32 PM1/24/10
to sage-devel
Hi everyone,

in sage 4.3.1 ~/.sage/init.sage is not automatically attached in the
notebook. I use the file to add a custom directory to sys.path. I can
import my own packages when running sage from the command line, but
not from the notebook.
Previously, I used the 4.1.1 release and init.sage was attached
automatically so I could import my own packages from within the
notebook. I'm on a macbook pro (15'' unibody), but still using OS X
10.5.8 (just didn't had the time to upgrade). Before, I downloaded
sage binaries, but the new binary is for 10.6 only so I had to compile
from source.

For a quick test, I added the line:

testvar = 'test'

to the file init.sage. The variable is defined when using sage from
the command line:

felix$ sage

----------------------------------------------------------------------
| Sage Version 4.3.1, Release Date:
2010-01-20 |
| Type notebook() for the GUI, and license() for
information. |

----------------------------------------------------------------------
sage: testvar
'test'

but after calling notebook() and creating a new worksheet, the
variable is not defined:

>>> testvar
NameError: name 'testvar' is not defined

Since I couldn't find any documentation on changes regarding
init.sage, I assume this is a bug in the latest release. Is this the
case? I realise, that sage 4.3.1 includes a new notebook release and
that the format for saved notebooks has changed.


Felix

Message has been deleted

Pat LeSmithe

unread,
Jan 27, 2010, 5:11:54 AM1/27/10
to sage-...@googlegroups.com, Minh Nguyen, sage-notebook
On 01/24/2010 02:21 PM, Minh Nguyen wrote:

> On Mon, Jan 25, 2010 at 9:06 AM, felix <fe...@neuro.uni-bremen.de> wrote:
>> in sage 4.3.1 ~/.sage/init.sage is not automatically attached in the

Thanks very much for reporting this problem, which is now

http://trac.sagemath.org/sage_trac/ticket/8092

felix

unread,
Jan 27, 2010, 9:58:24 AM1/27/10
to sage-devel
Thanks a lot. There is already a patch wich fixed the problem for me.
That was quick!

On 27 Jan., 11:11, Pat LeSmithe <qed...@gmail.com> wrote:
> http://trac.sagemath.org/sage_trac/ticket/8092

Reply all
Reply to author
Forward
0 new messages