On Nov 20, 12:21 pm, Gelonida N <gelon...@gmail.com> wrote: > I forgot to mention, that this is at the moment more a thought > experiment, than a real need. > > At the moment I will do exactly what you suggested. I will make sure, > that always the first import fails. > > But I wanted to learn more what is possible and which potential can of > worms I would open if I wanted to unimport a library of which I'm sure > that nobody is currently referencing (or refering? Not sure about my > English here) to.
Get how many references to an object: sys.getrefcount(sys) -- http://mail.python.org/mailman/listinfo/python-list