Just for curiosity...
In PHP we can get all opened in current process resources by using get_resources()
That was really helpful in one of my tasks when one of third-party libraries didn't close opened file properly and I used get_resources()
to close file stream to be able delete file before process ends.
So, the question is:
Is here any way in python to get and close opened somewhere inside process resources (or streams) without knowing object or method where it was opened?