How to get the list of all initialized objects and function definitions alive in python?

Yes.

>>> import gc
>>> gc.get_objects()

Not that you’ll find that useful. There is a lot of them. 🙂 Over 4000 just when you start Python.

Possibly a bit more useful is all the variables active locally:

>>> locals()

And the one active globally:

>>> globals()

(Note that “globally” in Python isn’t really global as such. For that, you need the gc.get_objects() above, and that you are unlikely to ever find useful, as mentioned).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)