[cig-commits] r4255 - cs/framework/trunk/cig/addyndum
leif at geodynamics.org
leif at geodynamics.org
Thu Aug 10 00:08:25 PDT 2006
Author: leif
Date: 2006-08-10 00:08:25 -0700 (Thu, 10 Aug 2006)
New Revision: 4255
Modified:
cs/framework/trunk/cig/addyndum/contexts.py
Log:
Minor fixes for ultra TB and serial codes.
Modified: cs/framework/trunk/cig/addyndum/contexts.py
===================================================================
--- cs/framework/trunk/cig/addyndum/contexts.py 2006-08-09 21:59:43 UTC (rev 4254)
+++ cs/framework/trunk/cig/addyndum/contexts.py 2006-08-10 07:08:25 UTC (rev 4255)
@@ -85,7 +85,28 @@
self.root = None
self.rp = {} # recursion protection
+ self._initUltraTB()
+ return
+
+
+ def _initUltraTB(self):
+ # Fire-up pdb and IPython when an exception occurs -- if IPython is available.
+ try:
+ import sys, IPython.ultraTB
+ if sys.stderr.isatty():
+ colorScheme = 'Linux'
+ else:
+ colorScheme = 'NoColor'
+ if sys.stdin.isatty() and sys.stdout.isatty() and sys.stderr.isatty():
+ callPdb = 1
+ else:
+ callPdb = 0
+ sys.excepthook = IPython.ultraTB.FormattedTB(mode='Verbose', color_scheme=colorScheme, call_pdb=callPdb)
+ except ImportError:
+ pass
+ return
+
#
# running
#
@@ -346,7 +367,7 @@
def preinitComponent(self, component):
- component.preinit(context)
+ component.preinit(self)
def initProperty(self, prop, value):
@@ -354,7 +375,7 @@
def initComponent(self, component):
- component.init(context)
+ component.init(self)
def finiProperty(self, prop, value):
@@ -362,7 +383,7 @@
def finiComponent(self, component):
- component.fini(context)
+ component.fini(self)
def postfiniProperty(self, prop, value):
@@ -370,7 +391,7 @@
def postfiniComponent(self, component):
- component.postfini(context)
+ component.postfini(self)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -446,22 +467,6 @@
#
def executeApplication(self):
-
- # Fire-up pdb and IPython when an exception occurs -- if IPython is available.
- try:
- import sys, IPython.ultraTB
- if sys.stderr.isatty():
- colorScheme = 'Linux'
- else:
- colorScheme = 'NoColor'
- if sys.stdin.isatty() and sys.stdout.isatty() and sys.stderr.isatty():
- callPdb = 1
- else:
- callPdb = 0
- sys.excepthook = IPython.ultraTB.FormattedTB(mode='Verbose', color_scheme=colorScheme, call_pdb=callPdb)
- except ImportError:
- pass
-
self.application.onLoginNode(self)
@@ -539,6 +544,8 @@
return
+
+ def _initUltraTB(self): pass
#
# running
More information about the cig-commits
mailing list