Created
December 23, 2022 12:05
-
-
Save bruno-uy/aa29eb87f134a4c78ddadb4c95c9daba to your computer and use it in GitHub Desktop.
Print current line of the current script
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
from inspect import currentframe, getframeinfo | |
print(getframeinfo(currentframe()).lineno) # prints 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment