How to check if frame object is active

Viewed 46
import sys

frame = sys._getframe()

How can I check now whether frame (of type FrameType) is still active (part of the current execution stack trace)?

I could iterate through the current stack trace (again via sys._getframe()) but is there maybe a more efficient or direct way?

0 Answers
Related