Skip to content

Instantly share code, notes, and snippets.

@koreno
Last active February 11, 2021 22:16
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 koreno/a19d6a8dbcd401c52f2db55d2fc97fbf to your computer and use it in GitHub Desktop.
Save koreno/a19d6a8dbcd401c52f2db55d2fc97fbf to your computer and use it in GitHub Desktop.
linecache example
import linecache
lineno = 423
fname = "/home/ofer/Sources/easypy/easypy/collections.py"
linecache.getline(fname, lineno)
# ' return random.randint(minimum, maximum)\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment