Re: referrers

2006-05-24 Thread Diez B. Roggisch
raghu wrote: > Diez, > > I did look into gc, specifically gc.get_referrers(), but it seemed to > give me something that I cant decipher. > > I added the following line. > > print "referrers ",gc.get_referrers(x0) > > This is what I got. > > referrers [{'__builtins__': , > '__file__': './tst1

Re: referrers

2006-05-24 Thread raghu
Diez, I did look into gc, specifically gc.get_referrers(), but it seemed to give me something that I cant decipher. I added the following line. print "referrers ",gc.get_referrers(x0) This is what I got. referrers [{'__builtins__': , '__file__': './tst1.py', 'pdb': , 'sys': , 'y': 24012, 'gc'

Re: referrers

2006-05-24 Thread Diez B. Roggisch
raghu wrote: > Hi All, > > The sys.getrefcount() is very useful to get the number of references on > a particular object. > > Is there any companion function to get "who" the referrers are ? > > for e.g. > > global x > global y > global z > > > x0=24012 > y=x0 > z=x0 > > print "ref count ",