CVS: anygui/lib/anygui Utils.py,1.17,1.18
Samuele Pedroni <[email protected]> Wed, 11 Sep 2002 08:21:04 -0700
| Newsgroups | gmane.comp.python.anygui.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/anygui/anygui/lib/anygui
In directory usw-pr-cvs1:/tmp/cvs-serv23711
Modified Files:
Utils.py
Log Message:
utilities for displaying obj identity; log flush.
Index: Utils.py
===================================================================
RCS file: /cvsroot/anygui/anygui/lib/anygui/Utils.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** Utils.py 8 Jul 2002 18:06:12 -0000 1.17
--- Utils.py 11 Sep 2002 15:21:02 -0000 1.18
***************
*** 4,7 ****
--- 4,19 ----
from Exceptions import InternalError
+ # for debugging...
+
+ def shortClassName(cl):
+ name = cl.__name__
+ lastdot = name.rfind('.')
+ return name[lastdot+1:]
+
+ def objDescr(obj):
+ return "%s@%s" % (shortClassName(obj.__class__),id(obj))
+
+ # --------------------------------------------------------------------
+
# To be phased out with the place() method
def flatten(seq):
***************
*** 166,169 ****
--- 178,184 ----
self._f = fileobj
+ def flush(self):
+ self._f.flush()
+
_logger = Log()
***************
*** 173,176 ****
--- 188,194 ----
def setLogFile(fileobj):
_logger.setLogFile(fileobj)
+
+ def logFlush():
+ _logger.flush()
_jython = sys.platform[:4] == 'java'
-------------------------------------------------------
In remembrance
www.osdn.com/911/