Emergency/postmortem Python console
Clone or download
Latest commit edf180d Aug 10, 2014
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
debian gitignore Aug 21, 2013
dist initial Aug 21, 2013
exconsole Custom command support Dec 1, 2013
.gitignore wheel Aug 10, 2014
LICENSE Initial commit Aug 21, 2013
Makefile wheel Aug 10, 2014
README.rst README Jul 27, 2014
example.py Custom command support Dec 1, 2013
setup.cfg wheel Aug 10, 2014
setup.py Read __version__ from the module Aug 29, 2013

README.rst

exconsole

Emergency/postmortem Python console

Installation from PyPI:

pip install python-exconsole

DEB and RPM packages are available in Ajenti repositories: http://support.ajenti.org/

Quick start:

import exconsole
exconsole.register()

do_dangerous_stuff()

Console can be invoked by sending SIGQUIT or just pressing Ctrl-\

Example of work:

Activating emergency console
----------------------------
Caused by:
ZeroDivisionError
integer division or modulo by zero

Stack frames:
  [  0] example.py:17

  [  1] example.py:15
              Tester().test()
  [  2] example.py:9
                  self.inner()
  [  3] example.py:6
                  self.divide(2, 0)
> [  4] example.py:3
                  return a / b
On frame 4
Source:
           def divide(self, a, b):
    >>         return a / b

Press Ctrl-D to leave console
Type "_help()"" for built-in commands

>>> print a,b
2 0
>>> _f(3)
On frame 3
Source:
           def inner(self):
    >>         self.divide(2, 0)

>>> print self
<__main__.Tester instance at 0x7f67c9a0e440>