You can use '--' to halt argument parsing in argparse, so you should be able to do:<div><br></div><div>%R -- c(1, -1)</div><div><br></div><div>-MinRK<br><br><div class="gmail_quote">On Fri, Aug 10, 2012 at 3:23 PM, Fernando Perez <span dir="ltr"><<a href="mailto:fperez.net@gmail.com" target="_blank">fperez.net@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Aug 10, 2012 at 3:00 PM, Matthew Brett <<a href="mailto:matthew.brett@gmail.com">matthew.brett@gmail.com</a>> wrote:<br>


> I couldn't think<br>
> immediately of a clean way to fix it that wouldn't involve hacking on<br>
> argparse.   Is there a good way?<br>
<br>
</div>Mmmh, me neither.  I don't know if disabling short options and<br>
allowing only -- ones would help, or if its string-walking algorithm<br>
is independent of the declared options...<br>
<br>
A bit stumped right now, I admit...<br>
<div class="HOEnZb"><div class="h5"><br>
f<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</div></div></blockquote></div><br></div>