[IPython-dev] Using argparse for %magics

Robert Kern robert.kern at gmail.com
Tue Apr 14 18:00:23 EDT 2009


On Tue, Apr 14, 2009 at 02:35, Fernando Perez <fperez.net at gmail.com> wrote:
> On Tue, Apr 7, 2009 at 11:51 AM, Robert Kern <robert.kern at gmail.com> wrote:
>> On 2009-04-07 13:11, Fernando Perez wrote:
>>
>>> +1 to argparse for this, as long as we carry it (not as a separate
>>> dependency).
>>
>> You already carry it in IPython.externals.
>
> Yes, as I mentioned elsewhere, I just meant that we should continue to
> carry it ourselves.  Sloppy me...
>
> BTW, do you want  any of this reviewed for 0.10?  If so,  I don't see
> it in your branch...
>
> https://code.launchpad.net/ipython/+activereviews

I wanted to float the idea before spending time integrating things
into IPython.  I would wait for 0.11 for most of it. There are lots of
different pieces that should probably integrated at different times
and in different ways. The argparse stuff should probably be done with
the greater %refactor. There are some of my magics that should go into
Extensions, and maybe a few that should go into the main Magic.py;
integrating these before the %refactor would involve adding the
magic_arguments stuff in support, but explicitly "deprecated" for
external use. The terminal_size() utility could probably be added to
ipapi (hookble for GUIs to override, of course) immediately.

Which of my magics would you want for 0.10? and where (in Magic.py or
Extensions/)? I doubt it's worth holding up 0.10 if it's getting
close.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the IPython-dev mailing list