Skip to content

Instantly share code, notes, and snippets.

@mortymacs
Created August 30, 2017 05:01
Show Gist options
  • Select an option

  • Save mortymacs/b16bec8b09632cf8583106b243cbb693 to your computer and use it in GitHub Desktop.

Select an option

Save mortymacs/b16bec8b09632cf8583106b243cbb693 to your computer and use it in GitHub Desktop.
Sample Code For Debug Situation
import inspect
print("LINE NUMBER:{} {}".format(__file__, inspect.getframeinfo(inspect.currentframe()).lineno))
# __file__ : shows current file name
# inspect.getframeinfo(inspect.currentframe()).lineno: shows current line number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment