From 1d9814f00c0b46ff1e18ad3a0b9925fbbc9a3a01 Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Fri, 7 Dec 2007 22:32:37 +0000 Subject: [PATCH] adding MiniLog and MiniLogSentry classes. Use these to capture a complex process and print the result when complete. --- direct/src/showbase/PythonUtil.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index cc826fe6e3..765ac474b7 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -3139,13 +3139,8 @@ class MiniLog: ('*'*50, self.name, '-'*50, '\n'.join(self.lines), '*'*50) def enterFunction(self, funcName, *args, **kw): - if args: - rArgs = [args[0].__class__.__name__ + ', '] - else: - rArgs = [] - - rArgs += [`x`+', ' for x in args[1:]] + \ - [ x + ' = ' + '%s, ' % `y` for x,y in kw.items()] + rArgs = [`x`+', ' for x in args] + \ + [ x + ' = ' + '%s, ' % `y` for x,y in kw.items()] if not rArgs: rArgs = '()'