[IPython-dev] line magic in middle of line

Damián Avila damianavila at gmail.com
Wed Dec 24 17:35:48 EST 2014


>But I can't currently see anywhere where this is documented for magic
functions.

It is poorly "documented" (in fact, shown) in the examples [1] and, IIRC,
in the IPython-in-depth tutorial...

[1]
http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/IPython%20Kernel/Beyond%20Plain%20Python.ipynb

Cheers


2014-12-24 19:28 GMT-03:00 Thomas Kluyver <takowl at gmail.com>:

> Hi Kyle,
>
> On 24 December 2014 at 21:52, Kyle Rawlins <rawlins at gmail.com> wrote:
>
>> Is this documented anywhere / actually supported behavior?  Under what
>> conditions can line magics be mixed with python code?
>
>
> It only works in simple assignments, and you can do it with both magics
> and !system escapes - the normal demo of that feature is to do "files =
> !ls". The timeit magic also returns a useful results object.
>
> It is documented for system commands:
>
> http://ipython.org/ipython-doc/dev/interactive/tutorial.html#system-shell-commands
>
> http://ipython.org/ipython-doc/dev/interactive/reference.html#manual-capture-of-command-output
>
> But I can't currently see anywhere where this is documented for magic
> functions.
>
> Thomas
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
*Damián*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141224/a3115d69/attachment.html>


More information about the IPython-dev mailing list