[IPython-User] Custom magic debugger function
Tue Aug 9 20:22:10 CDT 2011
Thanks. I'll look into that.
By the way, the docstring for magic_pdb still has a reference to ipythonrc.
On Tue, Aug 9, 2011 at 1:31 PM, Robert Kern <email@example.com> wrote:
> On 8/7/11 7:42 PM, Aaron Meurer wrote:
>> On Sun, Aug 7, 2011 at 5:46 AM, Thomas Kluyver<firstname.lastname@example.org> wrote:
>>> On 7 August 2011 09:04, Aaron Meurer<email@example.com> wrote:
>>>> Is it possible to create custom magic expressions? I'd like to create
>>>> a %pudb magic, which acts like %pdb except it calls PuDB on failure
>>>> instead of pdb.
>>> It's certainly possible to create custom magic expressions. For handling
>>> exceptions, I think that interactiveshell.set_custom_exc should do what you
>> Sorry, but how do I create custom magic? I didn't see anything in the
>> documentation, though I may have missed it.
> You need to write an extension. The included parallelmagic extension shows one
> way, using a Plugin:
> This is useful when you need to keep track of state as attributes on the Plugin
> My kernmagic package shows another way to expose individual magic functions that
> do not have state:
> 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
> IPython-User mailing list
More information about the IPython-User