[IPython-User] $ sign is removed in magic function
Mon Jan 2 11:43:56 CST 2012
Thanks for the clarification! I think I can live without the $ sign. !
or & should also be OK. They seem to pass. # doesn't work, though;)
On 01/02/2012 05:53 PM, Thomas Kluyver wrote:
> 2012/1/1 Zoltán Vörös <firstname.lastname@example.org <mailto:email@example.com>>
> If I run this in an ipython shell as
> In : %fimp foo.dat $123
> [u'foo.dat', u'123']
> i.e., the $ sign is removed. However, if I do this on the command line
> The $ sign is part of the magic system, for dropping Python variables
> into your commands, so you can do things like this:
> In : cmd = "math.factorial(100)"
> In : %timeit $cmd
> When you do $3, it evaluates it as the integer literal 3.
> It's replaced before the arguments are passed to your function, and
> there isn't a way to override it from inside the function. Is there
> another symbol you could use instead of $?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User