[IPython-dev] refactoring magics
Matthias BUSSONNIER
bussonniermatthias at gmail.com
Wed Sep 11 14:16:22 EDT 2013
> 1. Leave it completely in the magic writer's hands.
>
> 2. Do the expansion in run_line_magic and run_cell_magic and pass in
> both the raw line and the expanded line. ....
>
> 3. Provide an API function that users can call inside their magic...
>
> I'd welcome suggestions on which route people think is best, or whether
> there's a better way that I'm missing.
> Thanks,
> Greg
What about a decorator ? It does not give author much choice.
Or have the register_magics function take an kwarg which tell it wether or not the string will be expanded.
This one might allow us not to change the current api.
--
M
More information about the IPython-dev
mailing list