GC In Python: YAS (Yet Another Summary)

Darrell news at dorb.com
Wed Jun 16 18:34:01 CEST 1999


> Check out Lars's plumbo.py:
>
> <URL:http://www.stud.ifi.uio.no/~larsga/download/python/plumbo.py>
>
> - Gordon
>
Thanks Gordon.

At the risk of sounding like a lazy whiner. This would be more useful if it
could run more like profile or pdb. Having to add calls like
"r.add_object(non_GCed_object)" make it less useful.

Is there a way to capture the creation of any instance and call r.add_object
?
>>> import sys
>>> def p(frame, even, arg):
...     print frame, even, arg
...
>>> sys.settrace(p)
>>> l=[]
<frame object at 7c9410> call None
>>> d={}
<frame object at 7c9410> call None
>>>

In perfect world for lazy whiners this works,  plumbo.run("myStuff") and it
gives me a report.

--
--Darrell






More information about the Python-list mailing list