ipython/ipython — pull request #1854 by tkf (2012-06-04 22:45:43+00:00)
Title: Class `%hierarchy` and graphiz `%%dot` magics

This PR introduce two magics.

First magic is `%hierarchy`. This magic command draws hierarchy of given class or the class of given instance. For example, the following shows class hierarchy of currently running IPython shell.

```
%hierarchy get_ipython()
```

Second magic is `%%dot`. You can write graphiz dot language in a cell using this magic. Example:

```
%%dot -- -Kfdp
digraph G {
a->b; b->c; c->d; d->b; d->a;
}
```

I have two concerns:

* The function `run_dot`, which runs the `dot` command to produce the figure, is heavily borrowed from Sphinx extension. I am not sure if there are any copyright problem.

* I used `self.shell.display_formatter.format` to get "full path" (something like `IPython.zmq.zmqshell.ZMQInteractiveShell`) of a class. Maybe there is a better way to do that.