home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- import traceback
- import types
- import wx
- exitMainLoopCalled = False
-
- def checkMainThread(func):
-
- def new(*args, **kwargs):
- global exitMainLoopCalled
- if func.__name__ == 'ExitMainLoop':
- traceback.print_stack()
- exitMainLoopCalled = True
-
- return func(*args, **kwargs)
-
- return new
-
- excludes = [
- 'Event',
- 'Timer',
- 'CallLater',
- 'sip']
-
- def addThreadChecksToClassRecursive(obj):
- for symbol in dir(obj):
- objname = getattr(obj, '__name__', None)
- if objname is None:
- continue
-
- if hasattr(obj, '__module__'):
- objname = obj.__module__ + '.' + objname
-
- if symbol.startswith('_') or objname.startswith('_'):
- continue
-
- exclude = False
- for exc in excludes:
- if symbol.find(exc) != -1 or objname.find(exc) != -1:
- exclude = True
- continue
-
- if exclude:
- continue
-
- exec 'sym = %s.%s' % (objname, symbol)
- if type(sym) == types.MethodType:
- exec '%s.%s = checkMainThread(%s.%s)' % (objname, symbol, objname, symbol)
- continue
- if type(sym) == types.ClassType or type(sym) == types.TypeType:
- addThreadChecksToClassRecursive(sym)
- continue
-
-
-