ionelmc/python-manhole — pull request #18 by nirs (2014-09-06 13:43:49+00:00)
Title: User defined locals in manhole shell

Typically, when you add a manhole to existing application, the
application was not designed for this, so finding stuff from the manhole
shell is hard or even impossible.

This patch adds a new locals optional argument, allowing a user to add
application specific objects to manhole shell locals.

Example usage:

manhole.install(locals={'server', my_server})

From the manhole shell, you can now use "server":

>>> server.status()

When using automatic installation in child process, the locals are
inherited by the child process. It is the responsibility of the user to
handle object that became invalid after the fork.

Issue: #16