[IPython-dev] ipython as a debugger command-line interface?

Ville M. Vainio vivainio@gmail....
Wed Mar 11 02:35:48 CDT 2009


On Tue, Mar 10, 2009 at 11:28 PM, Rocky Bernstein <rocky@gnu.org> wrote:

> Here's an additional thought along that vein. The way pydbgr gets its
> commands for the command-line command processor is to import all files in a
> directory, introspect and look for classes that end in "Command" and
> instantiate each of those. (Now that I write this, better might be to check
> that they are instances of some Command superclass) .  Given this, it's
> possible to add a feature where users can write their own customized
> debugging commands and put them in a directory and when you start the
> debugger point to the directory and have the debugger add those additional
> debugger commands.
>
> I throw this idea out as an alternative to ipython way to add "magic"
> commands. I'm not that familiar with ipython magic commands, but probably
> that's the way one would add debugger-specific commands in ipython.

You can add magics programmatically through
_ip.expose_magic("mymagic", callable). So these schemes are not
mutually exclusive.

-- 
Ville M. Vainio
http://tinyurl.com/vainio


More information about the IPython-dev mailing list