[IPython-User] %loadpy after %edit close?
Thu Mar 1 09:26:38 CST 2012
Le 1 mars 2012 à 14:54, reckoner a écrit :
> I mainly use ipython with the qtconsole and I would like to have the
> contents of the %edit command automatically %loadpy-ed into the
> window when I close the editor.
I guess the reason why it is not really possible (to execute or loadpy after edit) is that with the qtconsole
you don't have any reasonable way to be certain of when the edition is done,
by opposition of the terminal python where the program returns when the edition is done.
Otherwise, I think the %edit magic for the Qtconsole is here :
L 411 def _edit(self, filename, line=None):
and the core edit magic in smith like
you can still try to add a flag and open a PR on github.
> I realize this is outside of the scope
> of the intent of the %edit command, but if you could point me to the
> relevant bits of code, I will try to hack this for myself.
> Thanks again for all the great work!
> IPython-User mailing list
More information about the IPython-User