Dear Mike,

On May 13, 12:31 pm, Mike Hansen <mhan...@gmail.com> wrote:
> Looking at the code for load in enlightening.

Thank you. I don't know why, but I forgot to try "load??".

> Here's the bit that is
> relevant for you:
>
>     ## Load file by absolute filename
>     X = loads(open(filename).read(), compress=compress)
>     try:
>         X._default_filename = os.path.abspath(filename)
>     except AttributeError:
>         pass
>
> Since loads just takes in a string, it has no way to know about the
> filename.

This is unfortunate.

>  However, the _default_filename is set as an attribute after
> it has already been loaded.

This is a little bit too late. I would need _default_filename being
around while __setstate__ is called.

Hmmm. I think I have to meditate a bit more on it.

Best regards,
    Simon

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