home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __docformat__ = 'restructuredtext en'
- from traceback_trap import TracebackTrap
- from IPython.ultraTB import ColorTB
-
- class SyncTracebackTrap(TracebackTrap):
-
- def __init__(self, sync_formatter = None, formatters = None, raiseException = True):
- TracebackTrap.__init__(self, formatters = formatters)
- if sync_formatter is None:
- sync_formatter = ColorTB(color_scheme = 'LightBG')
-
- self.sync_formatter = sync_formatter
- self.raiseException = raiseException
-
-
- def hook(self, *args):
- self.args = args
- if not self.raiseException:
- print self.sync_formatter(*self.args)
- else:
- raise
- return self.raiseException
-
-
-