[IPython-dev] Curly braces stripped from magic input

Thomas Kluyver takowl@gmail....
Sat Aug 31 12:03:00 CDT 2013


Yes, we run a derivative of format which allows you to embed Python
variables in magic or system calls like this:

myvar='foo'
%magic {myvar}


On 31 August 2013 09:36, Matt Davis <jiffyclub@gmail.com> wrote:

> Hi all,
>
> Software Carpentry is working on a magic for the Notebook for learning
> regex. It'll take a pattern and some strings and highlight matches. We've
> run into a problem because curly braces seem to be stripped from magic
> input before it gets to the function. See an example at
> http://nbviewer.ipython.org/6399267.
>
> It looks like the input is being sent through .format or some Jinja
> formatting because sending in {{ }} results in { }.
>
> Advice appreciated.
>
> Thanks,
> Matt & Greg
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130831/4c8f6bef/attachment.html 


More information about the IPython-dev mailing list