[IPython-dev] Minus signs in argparse line magics

MinRK benjaminrk@gmail....
Fri Aug 10 17:39:22 CDT 2012


You can use '--' to halt argument parsing in argparse, so you should be
able to do:

%R -- c(1, -1)

-MinRK

On Fri, Aug 10, 2012 at 3:23 PM, Fernando Perez <fperez.net@gmail.com>wrote:

> On Fri, Aug 10, 2012 at 3:00 PM, Matthew Brett <matthew.brett@gmail.com>
> wrote:
> > I couldn't think
> > immediately of a clean way to fix it that wouldn't involve hacking on
> > argparse.   Is there a good way?
>
> Mmmh, me neither.  I don't know if disabling short options and
> allowing only -- ones would help, or if its string-walking algorithm
> is independent of the declared options...
>
> A bit stumped right now, I admit...
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20120810/a26278e5/attachment.html 


More information about the IPython-dev mailing list