Created
March 25, 2023 17:16
-
-
Save Mufanc/6bccba398a787ed49c6b619740fb5d29 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
import inspect | |
import re | |
for info in inspect.stack(): | |
if re.fullmatch('<.*>', info.filename): | |
continue | |
frame = info.frame | |
print('-' * 50) | |
print(f'# {info.filename}') | |
print(inspect.getsource(inspect.getmodule(frame))) | |
exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment