On 10/4/07, Fernando Perez <[EMAIL PROTECTED]> wrote:
> > So they are two fairly different things, with the same name.
>
> %edit also takes arguments:
>
> ...
>
> - If the argument is the name of an object (other than a string),
> IPython will try to locate the file where it was defined and open the
> editor at the point where it is defined. You can use `%edit function`
> to load an editor exactly at the point where 'function' is defined,
> edit it and have the file be executed automatically.
>
> This is precisely the behavior you're describing.
Actually it isn't precisely the same behavior. If I do
sage: %edit factor
then this edits the factor function installed in
SAGE_ROOT/local/lib/python/site-packages/sage/...
(which will be overwritten by 'sage -br'), whereas
sage: edit(factor)
edits
SAGE_ROOT/devel/sage/sage/rings/arith.py
Moreover, we'll extend the edit command so when called in the notebook
it creates an textarea editor on the relevant file.
-- William
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---