/usr/lib64/python2.6/site-packages/mx/BeeBase
NameSizeModeActions
mxBeeBase/-0755rm
BeeBase.py4860644editdlrm
BeeBase.pyc6360644editdlrm
BeeBase.pyo6360644editdlrm
BeeDict.py515460644editdlrm
BeeDict.pyc494510644editdlrm
BeeDict.pyo490180644editdlrm
BeeIndex.py6270644editdlrm
BeeIndex.pyc7680644editdlrm
BeeIndex.pyo7680644editdlrm
BeeStorage.py360760644editdlrm
BeeStorage.pyc318500644editdlrm
BeeStorage.pyo318500644editdlrm
Cache.py67380644editdlrm
Cache.pyc65150644editdlrm
Cache.pyo65150644editdlrm
COPYRIGHT20490644editdlrm
ExitFunctions.py23080644editdlrm
ExitFunctions.pyc28780644editdlrm
ExitFunctions.pyo28780644editdlrm
FileLock.py124190644editdlrm
FileLock.pyc120940644editdlrm
FileLock.pyo120940644editdlrm
LICENSE45870644editdlrm
README1420644editdlrm
showBeeDict.pyc22890644editdlrm
showBeeDict.pyo22890644editdlrm
__init__.py3940644editdlrm
__init__.pyc5560644editdlrm
__init__.pyo5560644editdlrm
Edit: /usr/lib64/python2.6/site-packages/mx/BeeBase/ExitFunctions.py (2308B)
""" Central Registry for sys.exitfunc()-type functions Copyright (c) 1997-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com See the documentation for further information on copyrights, or contact the author. All Rights Reserved. """ import sys,traceback __version__ = '0.1' class ExitFunctionDispatcher: """ Singleton that manages exit functions. These function will be called upon system exit in reverse order of their registering. """ def __init__(self): """ Install the dispatcher as sys.exitfunc() """ self.exitfunc_list = [] if hasattr(sys,'exitfunc'): self.old_exitfunc = sys.exitfunc else: self.old_exitfunc = None sys.exitfunc = self.exitfunc def exitfunc(self, write=sys.stderr.write,print_exc=traceback.print_exc, stderr=sys.stderr): """ This is the exitfunc that we install to dispatch the processing to the registered other functions """ for f in self.exitfunc_list: try: f() except: write('Error while executing Exitfunction %s:\n' % f.__name__) print_exc(10,stderr) # Now that we're finished, call the previously installed exitfunc() if self.old_exitfunc: self.old_exitfunc() def register(self,f,position=0): """ Register f as exit function. These functions must not take parameters. - position = 0: register the function at the beginning of the list; these functions get called before the functions already in the list (default) - position = -1: register the function at the end of the list; the function will get called after all other functions """ if position < 0: position = position + len(self.exitfunc_list) + 1 self.exitfunc_list.insert(position,f) def deregister(self,f): """ Remove the function f from the exitfunc list; if it is not found, the error is silently ignored. """ try: self.exitfunc_list.remove(f) except: pass # Create the singleton ExitFunctions = ExitFunctionDispatcher()