#5908: [with patch; needs review] fix issues/bugs with load/attach
--------------------+-------------------------------------------------------
Reporter: was | Owner: cwitty
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.2
Component: misc | Keywords:
--------------------+-------------------------------------------------------
From Rado
{{{
Alright, here is my first open-source project patch:
http://www.math.uiuc.edu/~rkirov2/sage/11803.patch
The description in the patch file is short because vi is driving me
insane. I was going to add a better description in the .patch file
with gedit but wasn't sure if it is checksumed. Here is more detailed
description of what the patch does:
- for sage prompt, I added attached_files to the imported functions in
sage.misc.all
- for sage prompt, I added detach magic word (to mirror the build-in
behaviour in the notebook).
- for notebook attach and load, I used shlex.split (shlex is a
standard python library for shell commands), instead of regular split.
This makes sure that if your file has spacebars you can still call it
as long as it is enclosed by double-quotation marks i.e. "file1".
- for notebook detach, there was a simple bug (I must be the first one
to use it), where variable "filename" was referenced before being
defined.
- for notebook I exposed the build in function "attached_files()", by
adding it the preparser. This is a bit hacky, since it makes it look
like a function but it is not. Things like "detach attached_files()
[0]" won't work in notebook.
One thing worth mentioning is that in sage prompt, load and attach
cannot work with multiple files like in notebook. I figured that
ideally the prompt preparser should be unified with the notebook one
(the notebook code for loading and attaching is quite different),
which is a bigger project and should be well-thought out first.
Rado
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5908>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---