On 10/4/07, William Stein <[EMAIL PROTECTED]> wrote:

> The command we're discussing in Sage is different:
>
> edit(foo)
>
> for foo a function defined in the Sage library (right now, at least), finds
> the original source file that defines foo, and puts you in an editor
> to edit that file.  Doing "sage -br", would then build and install the
> resulting file.
>
> 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.

%edit knows how to edit strings, sets of interactive input, macros,
functions defined in files, files specified by name, etc.

Cheers,

f

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to