On Tue, Apr 7, 2009 at 12:16 PM, Brian Granger <ellisonbg....@gmail.com> wrote:
>
> Ahh, that makes sense.  It is the sympy.python thing that causes the
> problem.  This hack seems to work fix the issue in the notebook:
>
> import sympy
> sympy.sage_python = sympy.python
> del sympy.python
> from sympy import *
>
> But any code in sympy that uses sympy.python will now fail.  Really
> this is a bug in sage though.

That seems awfully complicated.  How about (untested):

sage_python = python
from sympy import *
python = sage_python

or (even shorter, and still untested):

from sympy import *
restore('python')

The %whatever syntax in the notebook works by calling the function
"whatever" in the notebook process's current global scope.  I actually
kind of like this design; it means you can easily add new handlers
(for instance, you could define a function in one notebook cell and
use it with the % syntax in the next cell).

Carl

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to