[IPython-user] %edit <object> unable to read tmp file created previously with %edit
Wed Jan 7 12:22:41 CST 2009
On Wed, Jan 7, 2009 at 1:52 AM, Ville M. Vainio <email@example.com> wrote:
> On Wed, Jan 7, 2009 at 7:17 AM, Kurt Smith <firstname.lastname@example.org> wrote:
> > I can %ed an empty file fine, but I can't %ed an object defined in that
> > file.
> You can %ed a function/method defined in the file, however.
> I.e. you can work around this by editing a specific method in the class.
Thanks for the response -- after browsing the IPython source
(IPython/Magic.py:magic_edit, line 2060) it's clear to me why it behaves as
it does. Empty classes aren't handled correctly, but classes with at least
one method in them are (not a big problem, since empty classes are pretty
rare). As indicated in a comment, the whole magic_edit() method needs some
cleaning up -- if I get some time I'll have a stab at it.
> Ville M. Vainio
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-user