Yes, you can certainly turn on the behaviour in Sage by writing your
last line as a function:

def parent_on():
     ipapi.get().set_hook("result_display", repr_and_parent)

However, I still haven't worked out how to write the corresponding
parent_off() function...

-Alasdair

On Feb 18, 1:07 pm, Mike Hansen <mhan...@gmail.com> wrote:
> On Tue, Feb 17, 2009 at 6:00 PM, Alasdair <amc...@gmail.com> wrote:
>
> > Yes, that works fine - thank you very much!  Is there a way of turning
> > such behavior on and off from within Sage?
>
> Not automatically.  You just need to write a little function that
> swaps the repr_and_parent hook with
> IPython.hooks.result_display (which is the default).
>
> --Mike
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to