Looking at the source for attached_files(), I don't see how removing elements from the list it returns could detach the files. It looks like you can detach files manually by deleting from the sage.misc.preparser.attached dictionary, but there is a function `detach` that does the job (as foreshadowed by the comments on the trac ticket.
I guess a new ticket should be opened to update the documentation for `attach` to remove this incorrect statement and to mention `detach`. It would also be good if the `attach` documentation mentioned `load_attach_path`. Some of the documentation for `sage.misc.preparse.load` might be worth duplicating in `attach`, since it is unlikely to be seen by users as the documentation for `sage.misc.preparse.load`. On May 6, 12:15 am, Florent Hivert <florent.hiv...@univ-rouen.fr> wrote: > Hi There, > > Ticket #3089 says: > > removing an attached file doesn't work > > The help page given by attach? claims: > > Type attached_files() for a list of all currently attached files. > You can remove files from this list to stop them from being watched. > > In fact, this has no effect when I try it: > > sage: version() > 'SAGE Version 2.10.1, Release Date: 2008-02-02' > sage: attached_files() > ['/mit/price/tmp/hessian.sage'] > sage: attached_files().pop() > '/mit/price/tmp/hessian.sage' > sage: attached_files() > ['/mit/price/tmp/hessian.sage'] > > And is closed as fixed by some other patch. However the problem is still here: > popcorn-*chur/kshape/sage $ sage > ---------------------------------------------------------------------- > | Sage Version 4.6.2, Release Date: 2011-02-25 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > Loading Sage library. Current Mercurial branch is: combinat > sage: attach spfact.py > sage: version() > 'Sage Version 4.6.2, Release Date: 2011-02-25' > sage: attached_files() > ['/home/florent/recherche/kSchur/kshape/sage/spfact.py'] > sage: attached_files().pop() > '/home/florent/recherche/kSchur/kshape/sage/spfact.py' > sage: attached_files() > ['/home/florent/recherche/kSchur/kshape/sage/spfact.py'] > sage: > > Should I reopen the ticket or open a new one ? Or is the bug between the > keyboard and the chair ? > > Cheers, > > Florent -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org