[IPython-dev] Cell Magic names

Fernando Perez fperez.net at gmail.com
Sat Jun 2 00:56:52 EDT 2012


On Fri, Jun 1, 2012 at 9:52 PM, MinRK <benjaminrk at gmail.com> wrote:
> I was just going to call it `%%shebang`, I think `%%#!` is a few too many
> special characters in a row.

I guess you could just call it '!', and it would then be

%%! bash
etc..

Though regarding the shell stuff, I think I'd prefer this to be a
*factory* that would return shell-like magics, so that we'd offer

%%shell  -> basically wrap around os.system()
%%bash or %%sh -> explicitly call bash (only available on POSIX)
%%cmd  -> explicitly call CMD.EXE (on windows)
%%powershell ? (don't know if it has a canonical shorthand).

That seems like a more natural usage pattern to me.

Cheers,

f



More information about the IPython-dev mailing list