Last active
February 11, 2021 22:16
-
-
Save koreno/f1f4164cb478d7a4188f71fdc5189742 to your computer and use it in GitHub Desktop.
Messing with linecache
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
size, mtime, lines, fullname = linecache.cache[fname] | |
lines[lineno - 1] | |
# ' return random.randint(minimum, maximum)\n' | |
lines[lineno - 1] = "Nothing to see here, please move along..." | |
linecache.getline(fname, lineno) | |
# 'Nothing to see here, please move along...' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment