[IPython-user] bug in edit magic: content of edited file is not accessible
bialix at ukr.net
Thu Jan 12 18:09:18 CST 2006
Fernando Perez пишет:
> Alexander Belchenko wrote:
>>In 0.6.15 when I edit file with edit magic command I've got content of
>>edited file in last Out variable. In 0.7.0 this is broken: after editing
>>code was executed but text is not accessible as _X variable. Is this
>>intended behaviour? I think it's a bug.
> Well, I deliberately removed that return statement, because I was finding it
> annoying to get all that output, just after I'd been editing the file anyways.
> If you could clarify your usage case for needing that info back as a
> variable, I can come up with a decent solution for the various cases.
Well, I'm found that I misunderstood sense of -p option when I run edit
magic. I think that this option invoke editor with last edited code but
instead it invoke editor with last used condition. So, if I do:
In: edit -p
In the second edit call I also get editor with empty file not with last
edited (if it was temporary). So I beg you to return old behaviour when
temporary file edited.
More information about the IPython-user