<div class="gmail_quote">2012/1/1 Zoltán Vörös <span dir="ltr"><<a href="mailto:zvoros@gmail.com">zvoros@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">If I run this in an ipython shell as <br>
<blockquote>In [24]: %fimp foo.dat $123 <br>
[u'foo.dat', u'123']<br>
</blockquote>
<br>
i.e., the $ sign is removed. However, if I do this on the command
line</div></blockquote></div><br>The $ sign is part of the magic system, for dropping Python variables into your commands, so you can do things like this:<br><br>In [5]: cmd = "math.factorial(100)"<br>In [6]: %timeit $cmd<br>
<br>When you do $3, it evaluates it as the integer literal 3.<br><br>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 $?<br>
<br>Thomas<br>