[IPython-dev] magic aliases

Juergen Hasch python at elbonia.de
Tue Dec 23 02:59:10 EST 2014


Try %alias

Example:
	%alias_magic t timeit
Gives:
	Created `%t` as an alias for `%timeit`.
	Created `%%t` as an alias for `%%timeit`.

  Juergen

Am 23.12.2014 um 08:40 schrieb John Griffiths:
> 
> Simple Q I think: is it possible to add a second alias for a magic function?
> 
> Basically, I'm using %%matlab and %matlab magics a lot, and
> I think my notebooks would look just a tad nicer if I could reduce those to  %%mb and %mb.
> 
> So is it possible to register '%%mb' and '%mb' as shorthands for '%%matlab' and '%matlab' ?
> 
> 
> Ta,
> 
> 
> john
> 
> 
> -- 
> 
> Dr. John Griffiths
> 
> Post-Doctoral Research Fellow
> 
> Rotman Research Institute, Baycrest
> 
> Toronto, Canada
> 
> and
> 
> Visiting Research Fellow
> 
> School of Physics
> 
> University of Sydney
> 
> 
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
> 




More information about the IPython-dev mailing list