The linecache module

This module is used to read lines from module source code. It caches recently visited modules (the entire source file, actually).

Example: Using the linecache module
# File:

import linecache

print linecache.getline("", 5)

$ python
print linecache.getline("", 5)

This module is used by the traceback module.


A Django site. rendered by a django application. hosted by webfaction.