Created
October 4, 2021 01:23
-
-
Save gyrospectre/1148f483af4e7e2cea4d807f1cb2b7cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_stackinfo(): | |
stack = inspect.stack() | |
stack_hash = hashlib.sha256(str(stack).encode('utf-8')).hexdigest() | |
stack_info = { | |
'stack_hash': stack_hash, | |
'entry_frame': { | |
'filename': stack[-1].filename, | |
'code_context': stack[-1].code_context | |
} | |
} | |
return stack_info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment