#11235: Make the ipython edit magic command edit the right file and show both
files
when doing ??
-------------------------------------------+--------------------------------
Reporter: mderickx | Owner: jason
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.8
Component: misc | Keywords: sd35 ipython
source file location
Work_issues: rebase on top of 4.8.alpha4 | Upstream: N/A
Reviewer: Marco Streng | Author: Maarten Derickx
Merged: | Dependencies:
-------------------------------------------+--------------------------------
Changes (by mstreng):
* status: needs_review => needs_work
Comment:
Sorry I missed the trac update. I'm reviewing right now. Like it very
much.
Mild reasons for needs_work:
* incorrect spelling of diffrent
* I guess you can't doctest {{{edit_devel}}}, but it would be good to get
rid of the following warning:
{{{
sage -coverage devel/sage/sage/misc/edit_module.py
----------------------------------------------------------------------
devel/sage/sage/misc/edit_module.py
SCORE devel/sage/sage/misc/edit_module.py: 100% (6 of 6)
Possibly wrong (function name doesn't occur in doctests):
* edit_devel(self, filename, linenum):
----------------------------------------------------------------------
}}}
Suggestions for the patch (these things aren't regressions, they were like
this always, so if you don't want to spend time on it, that's fine with
me):
* After %ed, the file is reloaded, which is not the correct thing to do.
It should be imported, otherwise doing %ed doesn't make sense. Example:
{{{
sage: EllipticCurve([1,2,3,4,6])
Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 6 over
Rational Field
sage: %ed EllipticCurve
Editing... done. Executing edited code...
sage: EllipticCurve([1,2,3,4,6])
ImportError: No module named ell_generic
}}}
* when the {{{.sub}}} is successful and {{{filename}}} ends with
{{{".sage"}}}, it would be easy to afterwards overwrite the site-packages
file with the source file. Then the user only has to {{{sage: from
sage.all import *}}} (which you can tell the user to do, or maybe program
Sage to do)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11235#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.