-
-
Notifications
You must be signed in to change notification settings - Fork 673
Closed
Description
On Jan 17, 2008 12:08 AM, Dan Drake <[email protected]> wrote:
> Hello,
>
> I'd like to unattach a file that is currently attached. The
The command to do this used to be called "detach". It has mysteriously completely
vanished from Sage since when I wrote it! It's in the notebook still, but it isn't available
from the command line anymore.
Anyway, I've reported this as trac #
In the meantime you can work around this problem as illustrated below:
sage: sage: attach example.sage
This is a simple SAGE example script.
...
sage: import sage.misc.interpreter
sage: sage.misc.interpreter.attached
{'/home2/sage/build/sage-2.10.alpha4/example.sage': 1197908255.0}
sage: del sage.misc.interpreter.attached['/home2/sage/build/sage-2.10.alpha4/example.sage']
sage: attached_files()
[]
> documentation for attach says that I can remove files from
> attached_files() to do this, but that doesn't seem to work:
>
> sage: attached_files()
> ['/home/drake/code/sage/foo.sage']
> sage: attached_files().pop()
> '/home/drake/code/sage/foo.sage'
> sage: attached_files()
> ['/home/drake/code/sage/foo.sage']
>
> It doesn't work because I'm accessing the list *returned by*
> attached_files; I need to access whatever attached_files() looks at to
> get that list. I used ??attached_files, but I don't seem to have access
> to the 'attached' variable.
>
> What I'd really like, though, is an 'unattach' function!
>
Component: user interface
Work Issues: Close as fixed
Issue created by migration from https://trac.sagemath.org/ticket/1811