On this page
linecache.lazycache
Prev: linecache.getline | Up: linecache
Rel: linecache.checkcache, linecache.clearcache, linecache.getline
Ref: docs.python.org — linecache.lazycache
Tags: #public #python3 #stdlib #linecache
Import
import linecache
from linecache import lazycache
Signature & Overview
linecache.lazycache(filename, module_globals)
Seed the cache for filename with module_globals.
Usage
import linecache
# Registers a module's loader so linecache can read it later even if the file isn't on disk (e.g. zipimport)
assert isinstance(linecache.lazycache(linecache.__file__, linecache.__dict__), bool)
Gotchas
- Returns
Trueif cached/registered (used internally bytraceback).
REPL Inspect
from linecache import lazycache
help(lazycache)
Linked from
Related notes
- tuts/python3/stdlib_module/linecache/checkcache Linked here; links to this page; shared tags: #linecache, #stdlib
- tuts/python3/stdlib_module/linecache/clearcache Linked here; links to this page; shared tags: #linecache, #stdlib
- tuts/python3/stdlib_module/linecache/getline Linked here; links to this page; shared tags: #linecache, #stdlib
- tuts/python3/stdlib_module/linecache Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib