|
@@ -20,8 +20,7 @@ __all__ = [
|
|
|
'nullGen', 'loopGen', 'makeFlywheelGen', 'flywheel', 'listToIndex2item',
|
|
'nullGen', 'loopGen', 'makeFlywheelGen', 'flywheel', 'listToIndex2item',
|
|
|
'listToItem2index', 'formatTimeCompact', 'deeptype', 'StdoutCapture',
|
|
'listToItem2index', 'formatTimeCompact', 'deeptype', 'StdoutCapture',
|
|
|
'StdoutPassthrough', 'Averager', 'getRepository', 'formatTimeExact',
|
|
'StdoutPassthrough', 'Averager', 'getRepository', 'formatTimeExact',
|
|
|
- 'startSuperLog', 'endSuperLog', 'typeName', 'safeTypeName',
|
|
|
|
|
- 'histogramDict', 'unescapeHtmlString',
|
|
|
|
|
|
|
+ 'typeName', 'safeTypeName', 'histogramDict', 'unescapeHtmlString',
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
if __debug__:
|
|
if __debug__:
|
|
@@ -2401,42 +2400,6 @@ class Default:
|
|
|
# useful for keyword arguments to virtual methods
|
|
# useful for keyword arguments to virtual methods
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
-superLogFile = None
|
|
|
|
|
-def startSuperLog(customFunction = None):
|
|
|
|
|
- global superLogFile
|
|
|
|
|
-
|
|
|
|
|
- if not superLogFile:
|
|
|
|
|
- superLogFile = open("c:\\temp\\superLog.txt", "w")
|
|
|
|
|
- def trace_dispatch(a,b,c):
|
|
|
|
|
- if b == 'call' and a.f_code.co_name != '?' and a.f_code.co_name.find("safeRepr") < 0:
|
|
|
|
|
- vars = dict(a.f_locals)
|
|
|
|
|
- if 'self' in vars:
|
|
|
|
|
- del vars['self']
|
|
|
|
|
- if '__builtins__' in vars:
|
|
|
|
|
- del vars['__builtins__']
|
|
|
|
|
- for i in vars:
|
|
|
|
|
- vars[i] = safeReprTypeOnFail(vars[i])
|
|
|
|
|
-
|
|
|
|
|
- if customFunction:
|
|
|
|
|
- superLogFile.write( "before = %s\n"%customFunction())
|
|
|
|
|
-
|
|
|
|
|
- superLogFile.write( "%s(%s):%s:%s\n"%(a.f_code.co_filename.split("\\")[-1],a.f_code.co_firstlineno, a.f_code.co_name, vars))
|
|
|
|
|
-
|
|
|
|
|
- if customFunction:
|
|
|
|
|
- superLogFile.write( "after = %s\n"%customFunction())
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- return trace_dispatch
|
|
|
|
|
- sys.settrace(trace_dispatch)
|
|
|
|
|
-
|
|
|
|
|
-def endSuperLog():
|
|
|
|
|
- global superLogFile
|
|
|
|
|
- if superLogFile:
|
|
|
|
|
- sys.settrace(None)
|
|
|
|
|
- superLogFile.close()
|
|
|
|
|
- superLogFile = None
|
|
|
|
|
-
|
|
|
|
|
def configIsToday(configName):
|
|
def configIsToday(configName):
|
|
|
# TODO: replace usage of strptime with something else
|
|
# TODO: replace usage of strptime with something else
|
|
|
# returns true if config string is a valid representation of today's date
|
|
# returns true if config string is a valid representation of today's date
|