[IPython-dev] Curly braces stripped from magic input
Thomas Kluyver
takowl at gmail.com
Sat Aug 31 13:03:00 EDT 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 at 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 at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130831/4c8f6bef/attachment.html>
More information about the IPython-dev
mailing list