On Tue, Apr 7, 2009 at 1:26 PM, Carl Witty <carl.wi...@gmail.com> wrote:
>
> 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).

I didn't know this. I think we should just rename it in sympy.

But we also have a "latex" function, so we should rename it to...
Well, maybe there is some way to fix this in sage. How often do you
need to create a new handler?

isn't something like the following sufficient:

sage.notebook.register_handler(myhandler)

?


Ondrej

--~--~---------~--~----~------------~-------~--~----~
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