Skip to content

Instantly share code, notes, and snippets.

@bruno-uy
Created December 23, 2022 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bruno-uy/aa29eb87f134a4c78ddadb4c95c9daba to your computer and use it in GitHub Desktop.
Save bruno-uy/aa29eb87f134a4c78ddadb4c95c9daba to your computer and use it in GitHub Desktop.
Print current line of the current script
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