[IPython-dev] Minus signs in argparse line magics

Tony Yu tsyu80@gmail....
Fri Aug 10 22:30:52 CDT 2012


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

> On Fri, Aug 10, 2012 at 4:09 PM, Thomas Kluyver <takowl@gmail.com> wrote:
> > However, in the case of rmagic:
> >
> > - It's not much use without options to specify input & output variables
> > - Some uses can't easily be replaced by cell magics, for instance if
> > you want to call it in a (Python) loop.
>
> Indeed, and for this reason I don't really see any solution other than
> using the official `--` mechanism, as ugly as it may be in some cases.
>


Could you just look for a function by searching for an open parenthesis to
split the command from the rest? This wouldn't cover all cases, but most,
maybe? And if needed, this magic parsing could be overridden by adding the
explicit separator ` -- `.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20120810/1da7c681/attachment.html 


More information about the IPython-dev mailing list