You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/06/06 20:03:23 UTC
cvs commit: gump/python/gump/utils __init__.py
ajack 2004/06/06 11:03:23
Modified: python/gump/utils __init__.py
Log:
This is too verbose. Once was enough...
Revision Changes Path
1.45 +18 -16 gump/python/gump/utils/__init__.py
Index: __init__.py
===================================================================
RCS file: /home/cvs/gump/python/gump/utils/__init__.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- __init__.py 3 Jun 2004 19:06:12 -0000 1.44
+++ __init__.py 6 Jun 2004 18:03:22 -0000 1.45
@@ -463,21 +463,23 @@
pass
def getRefCounts():
- d = {}
- sys.modules
- # collect all classes
- for m in sys.modules.values():
- for sym in dir(m):
- o = getattr (m, sym)
- if type(o) is types.ClassType:
- d[o] = sys.getrefcount (o)
- # sort by refcount
- pairs = map (lambda x: (x[1],x[0]), d.items())
- pairs.sort()
- pairs.reverse()
- return pairs
+ pass
+ #d = {}
+ #sys.modules
+ ## collect all classes
+ #for m in sys.modules.values():
+ # for sym in dir(m):
+ # o = getattr (m, sym)
+ # if type(o) is types.ClassType:
+ # d[o] = sys.getrefcount (o)
+ ## sort by refcount
+ #pairs = map (lambda x: (x[1],x[0]), d.items())
+ #pairs.sort()
+ #pairs.reverse()
+ #return pairs
def printTopRefs(count,message=None):
- if message: print 'References @ ', message
- for n, c in getRefCounts()[:count]:
- print '%10d %s - %s' % (n, c.__name__, `c`)
+ pass
+ #if message: print 'References @ ', message
+ #for n, c in getRefCounts()[:count]:
+ # print '%10d %s - %s' % (n, c.__name__, `c`)
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org