Anand Chitipothu <anandol...@gmail.com> writes:
[...] > You can also achieve the same using __del__. > > class Foo: > def __del__(self): > print "on exit" > > foo = Foo() > > if __name__ == '__main__': > print 3+4 > print 8+9 This whole business is kind of surreptitious. The PyODE library had a "world" object which can hold multiple geometries in it. Once you add it to the world, you expect it to keep track of the geometries. However, it doesn't and if the geometry objects go out of scope, it actually removes them from the world messing everything up. To keep them in there, you have to keep some references in Python land to the objects by putting them in a list or something. [...] -- Cordially, Noufal http://nibrahim.net.in _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers